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:10:30
Message-Id: 20101217170947.3b3719da@snowcone
In Reply to: Re: [gentoo-dev] What are || ( ) dependencies? by Sebastian Luther
1 On Fri, 17 Dec 2010 17:56:21 +0100
2 Sebastian Luther <SebastianLuther@×××.de> wrote:
3 > >> Why can't the PM handle >= / < cases itself?
4 > >
5 > > Because things are almost never as simple as 'just' >= / <. You can
6 > > add in clever trickery to deal with very specific cases, but the
7 > > second someone throws things off by adding in a use dependency or a
8 > > third package, things get weird.
9 >
10 > I thought we were talking about the simplest case here, that is a list
11 > of atoms for the same cat/pkg.
12
13 Here's the problem: if the package mangler gets this right (which
14 afaik both Portage and Paludis do):
15
16 || ( <a-1 >=a-1 )
17
18 you might naively expect it to get these right too:
19
20 || ( <a-1 ( >=a-1 b ) )
21 || ( <a-1 >a-1[x] ) # where a[-x] is the current user configuration
22
23 which it probably won't, and even if it does, it will get other minor
24 variations on these themes wrong.
25
26 > > What about || ( <a-2[x] ( >=a-2 b ) ) ? Should the package mangler
27 > > be clever enough to figure that one out too? What if b isn't already
28 > > installed there?
29 >
30 > What would repoman enforce here?
31
32 For that case, it probably couldn't detect it. But getting repoman to
33 yell at people for the simple cases at least would probably help people
34 to learn that they should always go best-leftest.
35
36 Part of the problem here is that developers don't seem to know about
37 the whole leftmost thing, and the heuristics we've all put in mean they
38 can quite often get away with not knowing it.
39
40 It also doesn't help that it's not really documented anywhere. It's not
41 in the devmanual, it's not in PMS (and it's hard to put it there,
42 assuming we're not requiring a particular selection algorithm), and the
43 stuff in ebuild(5) for || dependencies is just plain wrong.
44
45 --
46 Ciaran McCreesh

Attachments

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

Replies

Subject Author
Re: [gentoo-dev] What are || ( ) dependencies? Patrick Lauer <patrick@g.o>