[Yum-devel] [PATCH] bump the score of a provider in compare_provider if the reqpo pkg and it have the same repository.

Seth Vidal skvidal at fedoraproject.org
Fri Oct 16 15:34:58 UTC 2009



On Fri, 16 Oct 2009, James Antill wrote:

> On Fri, 2009-10-16 at 10:50 -0400, Seth Vidal wrote:
>> ---
>>  yum/depsolve.py |    6 +++++-
>>  1 files changed, 5 insertions(+), 1 deletions(-)
>>
>> diff --git a/yum/depsolve.py b/yum/depsolve.py
>> index 40be000..b10a72c 100644
>> --- a/yum/depsolve.py
>> +++ b/yum/depsolve.py
>> @@ -1167,7 +1167,11 @@ class Depsolve(object):
>>                          _('common prefix of %s between %s and %s' % (cpl, po, reqpo)))
>>
>>                      pkgresults[po] += cpl*2
>> -
>> +
>> +                # if a provider is from the same repo as the reqpo
>> +                # give it a slight nudge
>> +                if reqpo.repoid == po.repoid:
>> +                    pkgresults[po] += 2
>
> This needs to be "if repqpo and reqpo.repoid == po.repoid"

no it doesn't. Look above it - line 1163:

             if reqpo:


-sv



More information about the Yum-devel mailing list