On Thu, 11 Aug 2011 08:54:54 +0200
Fabio Erculiani <lx...@gentoo.org> wrote:
> >> I've intermittently spent my last two days trying to figure out a
> >> weird bug on Entropy dependency resolution algorithm (which is
> >> actually just a simple topological sorting out of a digraph)
> >
> > You can't use a naive topological sort to do dependency resolution.
> > RDEPEND-RDEPEND cycles are legal and common.
> 
> Yes, they're legal and common but they can likely generate build
> failures.

They're also necessary to support if you want to handle 'system'
correctly. Something I made a while back (and being careful to keep X
out of system, since usually it's in there):

http://dev.exherbo.org/~ciaranm/resolution-neato.png

All the orange packages depend upon all the other orange packages.

> Given your definition of PDEPEND, jdom stuff should get fixed. No
> matter what Portage/Paludis quirks do.

Yup.

> > Purely as a quality of implementation issue, scheduling a PDEPEND
> > reasonably soon after (or even before) the package requiring it may
> > be a good idea, simply because users may get confused if when they
> > try to install a bunch of things and one of those things gets
> > installed long before related packages. But you can't rely upon
> > that happening.
> 
> But since this can lead to failures, the correct behaviour must get
> defined by PMS. Otherwise everybody will go implementing schedulers as
> they like most.

There is no single correct behaviour. Any ordering that meets the rules
specified in PMS is correct.

> > (Incidentally, one could also argue that package manglers should
> > always try to come up with the most perverse legal ordering
> > possible for any situation. That way bugs will be identified much
> > more quickly. Part of the problem with Portage is that it has so
> > many tricks and so little error checking that broken things quite
> > often appear to work.)
> 
> Bad design is bad design. And there is no excuse.
> My feeling is that since Portage is actually able to figure out the
> correct order by just using tricks like the "ASAP", and even though
> PMS doesn't say anything about that, the issue is considered minor.
> I would rather see PMS clarify the correct behaviour of schedulers
> with respect to PDEPEND.

Forced ASAP is logically inconsistent. ASAP only *sometimes* works, and
it can't be relied upon. If a package only works with ASAP, it's
broken, both by the spec and by Portage under certain circumstances.

-- 
Ciaran McCreesh

Attachment: signature.asc
Description: PGP signature

Reply via email to