summaryrefslogtreecommitdiffstats
path: root/upgrade.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-10-14 15:17:30 +0000
committerJeremy Katz <katzj@redhat.com>2003-10-14 15:17:30 +0000
commite63a48ecb6b2d4999edc6deffe7965fa963ef90d (patch)
treeb067ad5443eb4d3512c4a9e56a53954dc4d3efa2 /upgrade.py
parent5b53773c12964bdcea08ff99614865cde248ac50 (diff)
downloadanaconda-e63a48ecb6b2d4999edc6deffe7965fa963ef90d.tar.gz
anaconda-e63a48ecb6b2d4999edc6deffe7965fa963ef90d.tar.xz
anaconda-e63a48ecb6b2d4999edc6deffe7965fa963ef90d.zip
epochs are ints but have to be strings for rpm.labelCompare. ugh
(#106965, #106343)
Diffstat (limited to 'upgrade.py')
-rw-r--r--upgrade.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/upgrade.py b/upgrade.py
index 1a0476e06..89ab051c2 100644
--- a/upgrade.py
+++ b/upgrade.py
@@ -523,11 +523,16 @@ def upgradeFindPackages(intf, method, id, instPath, dir):
if vers > currentVersion:
currentVersion = vers
+ if h[rpm.RPMTAG_EPOCH] is None:
+ epoch = None
+ else:
+ epoch = str(h[rpm.RPMTAG_EPOCH])
+
# if we haven't found a redhat-release that compares favorably
# to 6.2, check this one
if supportedUpgradeVersion <= 0:
val = rpm.labelCompare((None, '6.2', '1'),
- (h[rpm.RPMTAG_EPOCH], h[rpm.RPMTAG_VERSION],
+ (epoch, h[rpm.RPMTAG_VERSION],
h[rpm.RPMTAG_RELEASE]))
if val > 0:
supportedUpgradeVersion = 0