summaryrefslogtreecommitdiffstats
path: root/upgrade.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2004-09-30 20:50:18 +0000
committerJeremy Katz <katzj@redhat.com>2004-09-30 20:50:18 +0000
commit5d2c2809cd3ca23446f496dc0cd05880f151ed67 (patch)
treecbabad33949cc7c7d3a851fb71fbca0775a6ecd3 /upgrade.py
parent3b62a8225b008415c68753dc8e12da24ade2fec9 (diff)
downloadanaconda-5d2c2809cd3ca23446f496dc0cd05880f151ed67.tar.gz
anaconda-5d2c2809cd3ca23446f496dc0cd05880f151ed67.tar.xz
anaconda-5d2c2809cd3ca23446f496dc0cd05880f151ed67.zip
2004-09-30 Jeremy Katz <katzj@redhat.com>
* upgrade.py (upgradeFindPackages): If this is RHEL, warn if they're upgrading from < RHEL 3 (#134523)
Diffstat (limited to 'upgrade.py')
-rw-r--r--upgrade.py32
1 files changed, 13 insertions, 19 deletions
diff --git a/upgrade.py b/upgrade.py
index fade17a39..4aed492d2 100644
--- a/upgrade.py
+++ b/upgrade.py
@@ -520,41 +520,35 @@ def upgradeFindPackages(intf, method, id, instPath, dir):
# Figure out current version for upgrade nag and for determining weird
# upgrade cases
- currentVersion = 0.0
supportedUpgradeVersion = -1
- mi = ts.dbMatch('name', 'redhat-release')
+ mi = ts.dbMatch('provides', 'redhat-release')
for h in mi:
- try:
- vers = string.atof(h[rpm.RPMTAG_VERSION])
- except ValueError:
- vers = 0.0
- 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'),
+ val = rpm.labelCompare((None, '3', '1'),
(epoch, h[rpm.RPMTAG_VERSION],
h[rpm.RPMTAG_RELEASE]))
if val > 0:
supportedUpgradeVersion = 0
else:
supportedUpgradeVersion = 1
+ break
- if 0 and supportedUpgradeVersion == 0:
+ if productName.find("Red Hat Enterprise Linux") == -1:
+ supportedUpgradeVersion = 1
+
+ if supportedUpgradeVersion == 0:
rc = intf.messageWindow(_("Warning"),
- _("Upgrades for this version of %s "
- "are only supported from Red Hat Linux "
- "6.2 or higher. This appears to be an "
- "older system. Do you wish to continue "
- "the upgrade process?") %(productName,),
- type="yesno")
+ _("You appear to be upgrading from a system "
+ "which is too old to upgrade to this "
+ "version of %s. Are you sure you wish to "
+ "continue the upgrade "
+ "process?") %(productName,),
+ type = "yesno")
if rc == 0:
try:
resetRpmdb(id.dbpath, instPath)