Gentoo Archives: gentoo-dev

From: Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] What are || ( ) dependencies?
Date: Fri, 17 Dec 2010 17:02:26
Message-Id: 20101217170138.1665959c@snowcone
In Reply to: Re: [gentoo-dev] What are || ( ) dependencies? by "Paweł Hajdan
1 On Fri, 17 Dec 2010 17:49:22 +0100
2 "Paweł Hajdan, Jr." <phajdan.jr@g.o> wrote:
3 > > Paludis currently interprets this as "I prefer <1.3.99.901, but will
4 > > also accept >=1.3.99.901". In particular, if <1.3.99.901[xcb] is
5 > > already installed, libX11 won't be upgraded. Some Portage versions
6 > > also do this, and others don't.
7 >
8 > I don't understand why we can't upgrade libX11 in that case. Shouldn't
9 > emerge -uDNa world (or its Paludis equivalent) "think" like this:
10 >
11 > Okay, I have libX11 installed here, and a more recent version is
12 > available. The more recent version satisfies this || () dependency, so
13 > just update it.
14
15 That's not really how the Paludis resolver thinks. Basically, when it
16 encounters a || ( ) dependency, it selects one of the children based
17 upon a scoring algorithm. At the time it encounters the || ( )
18 dependency, it doesn't know for sure that it's allowed to upgrade
19 libX11, since a later ebuild might hard-dep upon the lower version.
20
21 Now, I *could* make it treat the very specific case of || ( <a-1[x]
22 >=a-1 ) as being a single dep spec like a[either <1[x] or >=1], but
23 that doesn't really help as soon as someone does this:
24
25 || ( <a-1[x] ( >=a-1 b ) )
26
27 which looks a lot like something someone would do.
28
29 > In this specific case, it seems reasonable to still upgrade libX11,
30 > right?
31
32 In this very specific case, rewriting || ( a[stuff] a[otherstuff] ) to
33 be like a[stuff || otherstuff] would solve the problem. But even
34 slightly altering the dependencies would break this. So the question is
35 to what degree a package mangler is required to be clever.
36
37 > > So would anyone be especially opposed to making "best leftmost" an
38 > > explicit requirement, enforced by repoman where possible (at least
39 > > for the >= / < case)?
40 >
41 > I don't think that >= / < case is enforceable by repoman (i.e. that we
42 > always prefer the more recent version of a package).
43
44 It's at least detectable...
45
46 --
47 Ciaran McCreesh

Attachments

File name MIME type
signature.asc application/pgp-signature