summaryrefslogtreecommitdiffstats
path: root/upgrade.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-02-13 13:13:25 -0500
committerChris Lumens <clumens@redhat.com>2009-02-16 10:59:39 -0500
commit87bf4551dbd14722f8400b973d9dd6f98b16710c (patch)
treeb70a96d28d000557c31541ea0c4cf00d7f9a9133 /upgrade.py
parenta395392eca0abb3dfd2d7e66665d0621360c32f0 (diff)
downloadanaconda-87bf4551dbd14722f8400b973d9dd6f98b16710c.tar.gz
anaconda-87bf4551dbd14722f8400b973d9dd6f98b16710c.tar.xz
anaconda-87bf4551dbd14722f8400b973d9dd6f98b16710c.zip
Encode our upgrade policy in productMatches/versionMatches and enforce it.
For Fedora, this means we will not allow upgrades of detected root filesystems more than two releases old, or "upgrading" a newer install with an older one. For RHEL, we don't yet know what to do so just allow things to continue as they always have. Using "upgradeany" still circumvents this check.
Diffstat (limited to 'upgrade.py')
-rw-r--r--upgrade.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/upgrade.py b/upgrade.py
index 1c4685d2e..a554d3bbe 100644
--- a/upgrade.py
+++ b/upgrade.py
@@ -153,10 +153,8 @@ def findExistingRoots(anaconda, upgradeany = 0):
anaconda.id.iscsi.startup(anaconda.intf)
if not flags.setupFilesystems:
- relstr = partedUtils.getReleaseString (anaconda.rootPath)
- if ((flags.cmdline.has_key("upgradeany")) or
- (upgradeany == 1) or
- (partedUtils.productMatches(relstr, productName))):
+ (prod, ver) = partedUtils.getReleaseString (anaconda.rootPath)
+ if flags.cmdline.has_key("upgradeany") or upgradeany == 1 or anaconda.id.instClass.productUpgradable(prod, ver):
return [(anaconda.rootPath, 'ext2', "")]
return []