On Fri, 17 Dec 2010 17:49:22 +0100
"Paweł Hajdan, Jr." <phajdan.jr@gentoo.org> wrote:
> > Paludis currently interprets this as "I prefer <1.3.99.901, but will
> > also accept >=1.3.99.901". In particular, if <1.3.99.901[xcb] is
> > already installed, libX11 won't be upgraded. Some Portage versions
> > also do this, and others don't.
> 
> I don't understand why we can't upgrade libX11 in that case. Shouldn't
> emerge -uDNa world (or its Paludis equivalent) "think" like this:
> 
> Okay, I have libX11 installed here, and a more recent version is
> available. The more recent version satisfies this || () dependency, so
> just update it.

That's not really how the Paludis resolver thinks. Basically, when it
encounters a || ( ) dependency, it selects one of the children based
upon a scoring algorithm. At the time it encounters the || ( )
dependency, it doesn't know for sure that it's allowed to upgrade
libX11, since a later ebuild might hard-dep upon the lower version.

Now, I *could* make it treat the very specific case of || ( <a-1[x]
>=a-1 ) as being a single dep spec like a[either <1[x] or >=1], but
that doesn't really help as soon as someone does this:

    || ( <a-1[x] ( >=a-1 b ) )

which looks a lot like something someone would do.

> In this specific case, it seems reasonable to still upgrade libX11,
> right?

In this very specific case, rewriting || ( a[stuff] a[otherstuff] ) to
be like a[stuff || otherstuff] would solve the problem. But even
slightly altering the dependencies would break this. So the question is
to what degree a package mangler is required to be clever.

> > So would anyone be especially opposed to making "best leftmost" an
> > explicit requirement, enforced by repoman where possible (at least
> > for the >= / < case)?
> 
> I don't think that >= / < case is enforceable by repoman (i.e. that we
> always prefer the more recent version of a package).

It's at least detectable...

-- 
Ciaran McCreesh