Gentoo Archives: gentoo-dev

From: Paul de Vrieze <pauldv@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Reliance upon || ( use? ( ) ) behaviour
Date: Sat, 24 Feb 2007 15:35:52
Message-Id: 200702241632.57007.pauldv@gentoo.org
In Reply to: Re: [gentoo-dev] Reliance upon || ( use? ( ) ) behaviour by Jason Stubbs
1 On Saturday 24 February 2007, Jason Stubbs wrote:
2 > On Saturday 24 February 2007 12:34, Ciaran McCreesh wrote:
3 > > On Sat, 24 Feb 2007 12:27:35 +0900 Jason Stubbs <jstubbs@g.o>
4 > >
5 > > wrote:
6 > > | For the 14 cases you mentioned that were making a mistake, they
7 > > | probably can be rewritten so as to force an install of the first
8 > > | matching package, but when that isn't what is wanted it becomes a bit
9 > > | of a headache.
10 > >
11 > > That should *always* be what's wanted. Packages should only alter
12 > > dependencies / build parameters based upon USE flags, not based upon
13 > > what else happens to be installed.
14 >
15 > Okay, I must be missing something here. If package foo can work with either
16 > bar or baz equily as well but not both, why should it force an artificial
17 > preference? Also, if packages should not specify dependencies based on
18 > what is installed, the semantics of || ( ) would need to be changed such
19 > that the first non-masked packages is always installed.
20 >
21 > The only reason I can see for the above is to be able to have non-broken
22 > binary packages. However, that can be addressed by replacing *DEPEND in
23 > binary packages with their resolved forms.
24
25 That is something that needs to be done anyway. In general a binary package
26 has SLOT dependencies on the libraries it uses. It is also unwise to use it
27 with an older version of a dependency.
28
29 So
30
31 RDEPEND=">=libfoo-1.2"
32
33 Against libfoo-1.3.5(SLOT=3) (where 1.4(SLOT=4) exists too
34
35 becomes something like:
36 BDEPEND="&& ( >=libfoo-1.3.5 libfoo[SLOT=3] )
37
38 I know this is not valid syntax, but it is just to convey the idea.
39
40 Paul
41
42
43
44 --
45 Paul de Vrieze
46 Gentoo Developer
47 Mail: pauldv@g.o
48 Homepage: http://www.devrieze.net