Le Mar 28 août 2012 03:12, Adam Williamson a écrit :
On 2012-08-25 22:52, M.M. wrote:
> Or is it better to add an explicit "Requires" (for e.g. GNOME Shell
> 3.4.x) to the Spec files? In such case, is something like "Requires:
> gnome-shell=3.4.*" allowed to specify all sub-releases belonging to
> the 3.4 branch?
You can't use wildcards like this, but I wonder if you could do this:
Requires: gnome-shell >= 3.3
Requires: gnome-shell < 3.5
I've never actually tried that, but it might work. If it doesn't,
someone tell me, cos I'd like to know =)
This only works as long as there is a single package providing gnome-shell
in the repo, as soon as someone releases a compat package this will fail
big time. The reqs are evaluated separately, so rpm thinks a system with
something providing gnome-shell 3.2 + something else providing gnome-shell
3.6 will work with your package.
In rpm, to restrict a version range on both ends, you need to combine
requires with conflicts (requires A >= x, conflicts A >= y). There is no
way to specify a range not open to infinity on one end as an atomic
requirement (it's an annoying limitation, but the positive side-effect is
that it forced people to give up on strict version locking and packages
upgrade by default).
--
Nicolas Mailhot