![](https://seccdn.libravatar.org/avatar/d7a1abb38a8ed313081bb8f250b16199.jpg?s=120&d=mm&r=g)
On 12/03/2009 10:00 PM, Michael Matz wrote:
Hi,
On Thu, 3 Dec 2009, Wolfgang Rosenauer wrote:
and have C Requires: xulrunner-api-verison = 1.2.3
That will make C require exactly that version of the api.
That would allow to install a B that doesn't provide this capability, as long as A does. You need to use different names for A and B and require both from C (in addition to the supplements it already has).
But then I would for example get a hard requirement to B when A and C are installed and that's also not wanted ;-)
Then you didn't specify your requirements exactly: I understood your first mail as C supplementing (A and B), as in, C should be there, if available and A _and_ B are installed (in difference to e.g. just B installed).
Yeah, I probably failed a bit with describing the issue. C supplements A; and C supplements B (together with some other package but that's not that important)
Or rather that if both are installed then both need to provide at least version X of whatever, but apart from that (especially in absence of C) there should be no conflict of A<->B no matter what version they provide?
Correct.
In that case you need to model C like a patch: it needs to conflict with all smaller versions of $provides. This only works if A and B provide something at all. E.g.:
A: Provides: provides-for-C = 1.0 B: Provides: provides-for-C = 1.1
C: Conflicts: provides-for-C < 1.0
(plus the supplement that C already has). In this way it will be possible to install A and C alone, or A and B and C. But it will not be possible to install an old A and C (if the predicates in the solver are solved correctly), e.g. when A only provides "provides-for-C = 0.2". Problems will arise if A or B don't provide "provides-for-C" at all: the missing caps won't generate a conflict, hence very old A's could be installed. I think you need to solved this by an additional conflict from C to old versions of A and B which you need to hardcode. E.g. assuming that package A in version 1.3 was the first to provide provides-for-C at all you would add a conflict:
Very old A's or B's (as in when they don't have provides-for-C) don't need to conflict. It still works but w/o a certain feature.
C: Conflicts: A < 1.3
to C. From then on you would not be able to install too old A/B's (those that don't give any hint) anymore at all, and from then on only newer A/B's that match the requirements of C, if installed.
I think the conflicts to older versions of the virtual provides (provides-for-C) as suggested by Luke and darix should work. Thanks, Wolfgang -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org