summaryrefslogtreecommitdiffstats
path: root/findpackageset.py
diff options
context:
space:
mode:
authorPaul Nasrat <pnasrat@redhat.com>2004-07-12 13:11:45 +0000
committerPaul Nasrat <pnasrat@redhat.com>2004-07-12 13:11:45 +0000
commitd4675cc32556e3c23e277530d75a7467ac713f53 (patch)
treef932cb6078f8efb07fe51361af2bae7939b62869 /findpackageset.py
parent85298fea78b739063340abfb7c1db11884fb2b9e (diff)
downloadanaconda-d4675cc32556e3c23e277530d75a7467ac713f53.tar.gz
anaconda-d4675cc32556e3c23e277530d75a7467ac713f53.tar.xz
anaconda-d4675cc32556e3c23e277530d75a7467ac713f53.zip
Fix non-versioned obsoletes (#127519)
Diffstat (limited to 'findpackageset.py')
-rw-r--r--findpackageset.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/findpackageset.py b/findpackageset.py
index 8b8a73120..be0f2fd08 100644
--- a/findpackageset.py
+++ b/findpackageset.py
@@ -83,15 +83,20 @@ def findpackageset(hdrlist, dbPath='/'):
mi = ts.dbMatch('name', obs)
oevr = strToVersion(obsver)
for h in mi:
-# dEBUG("adding %(name)s to the upgrade set for obsoletes" % pkg)
- if h[rpm.RPMTAG_EPOCH] is None:
- epoch = '0'
- else:
- epoch = str(h[rpm.RPMTAG_EPOCH])
- val= rpm.labelCompare(oevr,(epoch,h[rpm.RPMTAG_VERSION],h[rpm.RPMTAG_RELEASE]))
- if val > 0:
+ if not obsver:
+# unversioned obsoletes win
addNewPackageToUpgSet(pkgDict, pkg)
break
+ else:
+# dEBUG("adding %(name)s to the upgrade set for obsoletes" % pkg)
+ if h[rpm.RPMTAG_EPOCH] is None:
+ epoch = '0'
+ else:
+ epoch = str(h[rpm.RPMTAG_EPOCH])
+ val = rpm.labelCompare(oevr,(epoch,h[rpm.RPMTAG_VERSION],h[rpm.RPMTAG_RELEASE]))
+ if val > 0:
+ addNewPackageToUpgSet(pkgDict, pkg)
+ break
return pkgDict.values()