Re: yum, and 2 packages that provide the same thing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2008-04-17 at 18:00 -0600, Stephen Warren wrote:
> I have a question re: how yum determines which package to install when
> they both provide the same thing.
> 
> Specifically, I have:
> 
> unison213
>   obsoletes:
>     unison < 2.27.57-3
>   provides:
>     unison = 2.13.16-9.fc8.3
>     unison213 = 2.13.16-9.fc8.3

 This obsoletes itself, which recent versions of yum should handle
better ... but is still "interesting" to say the least.

> unison227:
>   obsoletes:
>     unison < 2.27.57-3
>   provides:
>     unison = 2.27.57-7.fc8.3
>     unison227 = 2.27.57-7.fc8.3
> 
> (Equally, I hit the same issue if unison213 does not provide "unison",
> just "unison213".)
> 
> If those two packages are in a repository, and I type:
> 
> yum install unison

 Which version of yum matters _a lot_ here.
 I'm pretty sure that yum-3.2.14-10 (current Fedora 9 candidate) will
pick unison227, due to that obsoleting unison213 but not being obsoleted
by it.

 If the obsoleting _doesn't_ come into play, for some reason, then it
will basically pick randomly atm. with maybe a slight preference for
whichever is first in the repo MD.
 Doing a full version comparison over all provides of each package, is
possible but unlikely to happen unless it's 100% required. Always
picking the alphasorted highest/lowest pkg is also possible, if that
needs to be done.
 But the most obvious fix is to remove the self obsoletes on the first
package.

> then I *expect* yum to see that both unison213 and unison227 provide
> unison, and pick the package that provides the highest version number, and
> install it.
> 
> However, what actually happens is that yum picks unison213 to install.
> 
> I'm not sure if yum is picking:
> * The first package it finds
> * The "first" package by some sorting order that matches
> * Some random package (although it's consistent)
> 
> Can anybody shed any light?

 There are a few tests now, if you need to know all the details, it
probably means doom, but you want to see _compare_providers() in
depsolve.py

-- 
James Antill <james@xxxxxxxxxxxxxxxxx>
Fedora

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux