[Yum-devel] Depsolving I don't understand

Seth Vidal skvidal at fedoraproject.org
Mon Apr 6 15:23:05 UTC 2009



On Mon, 6 Apr 2009, James Antill wrote:

> On Sun, 2009-04-05 at 23:01 +0200, Jeroen van Meeuwen wrote:
>> I found the following situation:
>>
>> On an x86_64 system, I get a list of package names (['foo']).
>> I resolve the package names to actual available packages (pos),
>> and select them all (sorry 'bout that)
>>
>> Then of course, given pkgpolicy=newest and multilib_policy=best, yum -d9
>> shows the following as a result of yum/depsolve:993:_compare_providers()
>> (in order of best match, see snippet below):
>>
>> foo-1.0.x86_64, foo-1.1.x86_64, (both equal score)
>> foo-1.0.i386, foo-1.1.i386 (both equal but lower score)
>>
>> The resulting transaction has foo-1.0.x86_64.
>>
>> My question here is, shouldn't _compare_providers() take into account
>> version numbers as well?
>
> No, at least not in the same way YumBase.install() does. For instance
> say you do "yum install foo-1.0" and then hit the above situation due to
> deps. _compare_providers() shouldn't update from what you wanted.
> Also _compare_providers() mostly works on packages of different names,
> so comparing them via. versions is a bad idea.


But on rhel5, for example, yum resolvedep is returning an older pkg simply 
b/c none of the others are distinguinshing themselves in any way.

For resolving pkg dependencies - I think going with whatever order they 
come back is fine - maybe even preferred b/c  it helps people catch 
insufficiently-specified Requires.

For the cli it makes sense to sort them to hand back the newest.

Which is what I just checked in.


-sv



More information about the Yum-devel mailing list