[Yum-devel] [PATCH 2/3] Is base package name installed, added as a compare_providers test Should fix the problem that ticket/296 has
James Antill
james at and.org
Sun Oct 18 04:11:39 UTC 2009
Also add debug output for reqpo common repoid comparison.
Also bump the nudge from 2 to 8, so it should nudge past shortest
name.
---
yum/depsolve.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/yum/depsolve.py b/yum/depsolve.py
index b10a72c..5e855d5 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -1160,6 +1160,10 @@ class Depsolve(object):
self.verbose_logger.log(logginglevels.DEBUG_4,
_('common sourcerpm %s and %s' % (po, reqpo)))
pkgresults[po] += 20
+ if self.isPackageInstalled(po.base_package_name):
+ self.verbose_logger.log(logginglevels.DEBUG_4,
+ _('base package %s is installed for %s' % (po.base_package_name, po)))
+ pkgresults[po] += 5 # Same as ipkgresults above.
if reqpo:
cpl = _common_prefix_len(po.name, reqpo.name)
if cpl > 2:
@@ -1171,7 +1175,9 @@ class Depsolve(object):
# if a provider is from the same repo as the reqpo
# give it a slight nudge
if reqpo.repoid == po.repoid:
- pkgresults[po] += 2
+ self.verbose_logger.log(logginglevels.DEBUG_4,
+ _('common repoid of %s between %s and %s' % (po.repoid, po, reqpo)))
+ pkgresults[po] += 8
pkgresults[po] += (len(po.name)*-1)
bestorder = sorted(pkgresults.items(), cmp=_cmp_best_providers)
--
1.6.2.5
More information about the Yum-devel
mailing list