On Fri, 17 Dec 2010 17:56:21 +0100
Sebastian Luther <SebastianLuther@gmx.de> wrote:
> >> Why can't the PM handle >= / < cases itself?
> > 
> > Because things are almost never as simple as 'just' >= / <. You can
> > add in clever trickery to deal with very specific cases, but the
> > second someone throws things off by adding in a use dependency or a
> > third package, things get weird.
> 
> I thought we were talking about the simplest case here, that is a list
> of atoms for the same cat/pkg.

Here's the problem: if the package mangler gets this right (which
afaik both Portage and Paludis do):

    || ( <a-1 >=a-1 )

you might naively expect it to get these right too:

    || ( <a-1 ( >=a-1 b ) )
    || ( <a-1 >a-1[x] ) # where a[-x] is the current user configuration

which it probably won't, and even if it does, it will get other minor
variations on these themes wrong.

> > What about || ( <a-2[x] ( >=a-2 b ) ) ? Should the package mangler
> > be clever enough to figure that one out too? What if b isn't already
> > installed there?
> 
> What would repoman enforce here?

For that case, it probably couldn't detect it. But getting repoman to
yell at people for the simple cases at least would probably help people
to learn that they should always go best-leftest.

Part of the problem here is that developers don't seem to know about
the whole leftmost thing, and the heuristics we've all put in mean they
can quite often get away with not knowing it.

It also doesn't help that it's not really documented anywhere. It's not
in the devmanual, it's not in PMS (and it's hard to put it there,
assuming we're not requiring a particular selection algorithm), and the
stuff in ebuild(5) for || dependencies is just plain wrong.

-- 
Ciaran McCreesh