Gentoo Archives: gentoo-dev

From: Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] The fun of being a PDEPEND
Date: Thu, 11 Aug 2011 07:02:30
Message-Id: 20110811075736.1d78ffd6@googlemail.com
In Reply to: Re: [gentoo-dev] The fun of being a PDEPEND by Fabio Erculiani
1 On Thu, 11 Aug 2011 08:54:54 +0200
2 Fabio Erculiani <lxnay@g.o> wrote:
3 > >> I've intermittently spent my last two days trying to figure out a
4 > >> weird bug on Entropy dependency resolution algorithm (which is
5 > >> actually just a simple topological sorting out of a digraph)
6 > >
7 > > You can't use a naive topological sort to do dependency resolution.
8 > > RDEPEND-RDEPEND cycles are legal and common.
9 >
10 > Yes, they're legal and common but they can likely generate build
11 > failures.
12
13 They're also necessary to support if you want to handle 'system'
14 correctly. Something I made a while back (and being careful to keep X
15 out of system, since usually it's in there):
16
17 http://dev.exherbo.org/~ciaranm/resolution-neato.png
18
19 All the orange packages depend upon all the other orange packages.
20
21 > Given your definition of PDEPEND, jdom stuff should get fixed. No
22 > matter what Portage/Paludis quirks do.
23
24 Yup.
25
26 > > Purely as a quality of implementation issue, scheduling a PDEPEND
27 > > reasonably soon after (or even before) the package requiring it may
28 > > be a good idea, simply because users may get confused if when they
29 > > try to install a bunch of things and one of those things gets
30 > > installed long before related packages. But you can't rely upon
31 > > that happening.
32 >
33 > But since this can lead to failures, the correct behaviour must get
34 > defined by PMS. Otherwise everybody will go implementing schedulers as
35 > they like most.
36
37 There is no single correct behaviour. Any ordering that meets the rules
38 specified in PMS is correct.
39
40 > > (Incidentally, one could also argue that package manglers should
41 > > always try to come up with the most perverse legal ordering
42 > > possible for any situation. That way bugs will be identified much
43 > > more quickly. Part of the problem with Portage is that it has so
44 > > many tricks and so little error checking that broken things quite
45 > > often appear to work.)
46 >
47 > Bad design is bad design. And there is no excuse.
48 > My feeling is that since Portage is actually able to figure out the
49 > correct order by just using tricks like the "ASAP", and even though
50 > PMS doesn't say anything about that, the issue is considered minor.
51 > I would rather see PMS clarify the correct behaviour of schedulers
52 > with respect to PDEPEND.
53
54 Forced ASAP is logically inconsistent. ASAP only *sometimes* works, and
55 it can't be relied upon. If a package only works with ASAP, it's
56 broken, both by the spec and by Portage under certain circumstances.
57
58 --
59 Ciaran McCreesh

Attachments

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