[yum-commits] Branch 'yum-3_2_X' - yum/depsolve.py yum/rpmsack.py
James Antill
james at osuosl.org
Thu Nov 11 06:01:06 UTC 2010
yum/depsolve.py | 5 ++++-
yum/rpmsack.py | 5 +++++
2 files changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 6d3b6f5cfddea2659b452f93df8fc0f7a44ffaa4
Author: James Antill <james at and.org>
Date: Wed Nov 10 18:29:01 2010 -0500
Fix huge checkConflicts regression due to 4.9.x code conversion.
diff --git a/yum/depsolve.py b/yum/depsolve.py
index b0d1e80..f273cff 100644
--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -1103,8 +1103,11 @@ class Depsolve(object):
for po in self.rpmdb.returnConflictPackages():
if self.tsInfo.getMembersWithState(po.pkgtup, output_states=TS_REMOVE_STATES):
continue
+ conflicts = po.returnPrco('conflicts')
+ if not conflicts: # We broke this due to dbMatch() usage.
+ continue
cpkgs.append(po)
- for conflict in po.returnPrco('conflicts'):
+ for conflict in conflicts:
(r, f, v) = conflict
for conflicting_po in self.tsInfo.getNewProvides(r, f, v):
if conflicting_po.pkgtup[0] == po.pkgtup[0] and conflicting_po.pkgtup[2:] == po.pkgtup[2:]:
diff --git a/yum/rpmsack.py b/yum/rpmsack.py
index e227729..2302cf6 100644
--- a/yum/rpmsack.py
+++ b/yum/rpmsack.py
@@ -40,6 +40,7 @@ import yum.depsolve
class RPMInstalledPackage(YumInstalledPackage):
def __init__(self, rpmhdr, index, rpmdb):
+ self._has_hdr = True
YumInstalledPackage.__init__(self, rpmhdr, yumdb=rpmdb.yumdb)
# NOTE: We keep summary/description/url because it doesn't add much
# and "yum search" uses them all.
@@ -638,6 +639,10 @@ class RPMDBPackageSack(PackageSackBase):
if hdr['name'] == 'gpg-pubkey': # Just in case...
continue
+ if not hdr[rpm.RPMTAG_CONFLICTNAME]:
+ # Pre. rpm-4.9.x the above dbMatch() does nothing.
+ continue
+
po = self._makePackageObject(hdr, mi.instance())
result[po.pkgid] = po
if po._has_hdr:
More information about the Yum-commits
mailing list