[yum-commits] Branch 'yum-3_2_X' - yum/depsolve.py
skvidal at osuosl.org
skvidal at osuosl.org
Fri Oct 16 17:34:58 UTC 2009
yum/depsolve.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit f28b608e7f0d59ee238e85e85ee9c849417fb2d3
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Fri Oct 16 10:48:48 2009 -0400
bump the score of a provider in compare_provider if the reqpo pkg and it have
the same repository.
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
pkgresults[po] += (len(po.name)*-1)
bestorder = sorted(pkgresults.items(), cmp=_cmp_best_providers)
More information about the Yum-commits
mailing list