diff options
author | Radek Vykydal <rvykydal@redhat.com> | 2009-07-29 18:12:26 +0200 |
---|---|---|
committer | Radek Vykydal <rvykydal@redhat.com> | 2009-07-30 12:02:49 +0200 |
commit | ba1260e9321b2e3e473a2ea961bd6b7351cbdf28 (patch) | |
tree | 3d95d02385c31f0b104e5f1bbcf5c21459dbd002 | |
parent | 5833101c41beb064efb22670e1392470484b4c99 (diff) | |
download | anaconda-ba1260e9321b2e3e473a2ea961bd6b7351cbdf28.tar.gz anaconda-ba1260e9321b2e3e473a2ea961bd6b7351cbdf28.tar.xz anaconda-ba1260e9321b2e3e473a2ea961bd6b7351cbdf28.zip |
Make upgradeany boot option work again (#513227)
-rw-r--r-- | iw/examine_gui.py | 3 | ||||
-rw-r--r-- | rescue.py | 2 | ||||
-rw-r--r-- | upgrade.py | 7 |
3 files changed, 7 insertions, 5 deletions
diff --git a/iw/examine_gui.py b/iw/examine_gui.py index 3a62e06c5..8d067ba5b 100644 --- a/iw/examine_gui.py +++ b/iw/examine_gui.py @@ -93,7 +93,8 @@ class UpgradeExamineWindow (InstallWindow): # we might get here after storage reset that obsoleted # root device objects we had found if not self.anaconda.id.rootParts: - self.anaconda.id.rootParts = upgrade.findExistingRoots(self.anaconda) + self.anaconda.id.rootParts = upgrade.findExistingRoots(self.anaconda, + flags.cmdline.has_key("upgradeany")) upgrade.setUpgradeRoot(self.anaconda) self.parts = self.anaconda.id.rootParts @@ -297,7 +297,7 @@ def runRescue(anaconda, instClass): import storage storage.storageInitialize(anaconda) - disks = upgrade.findExistingRoots(anaconda, upgradeany = 1) + disks = upgrade.findExistingRoots(anaconda, upgradeany=True) if not disks: root = None diff --git a/upgrade.py b/upgrade.py index c8b6757a3..c94cc3ae4 100644 --- a/upgrade.py +++ b/upgrade.py @@ -76,7 +76,8 @@ def findRootParts(anaconda): if anaconda.dir == DISPATCH_BACK: return if anaconda.id.rootParts is None: - anaconda.id.rootParts = findExistingRoots(anaconda) + anaconda.id.rootParts = findExistingRoots(anaconda, + flags.cmdline.has_key("upgradeany")) setUpgradeRoot(anaconda) @@ -88,10 +89,10 @@ def findRootParts(anaconda): anaconda.dispatch.skipStep("findinstall", skip = 1) anaconda.dispatch.skipStep("installtype", skip = 0) -def findExistingRoots(anaconda, upgradeany = 0): +def findExistingRoots(anaconda, upgradeany=False): if not flags.setupFilesystems: (prod, ver) = getReleaseString (anaconda.rootPath) - if flags.cmdline.has_key("upgradeany") or upgradeany == 1 or anaconda.id.instClass.productUpgradable(prod, ver): + if flags.cmdline.has_key("upgradeany") or upgradeany or anaconda.id.instClass.productUpgradable(prod, ver): return [(anaconda.rootPath, "")] return [] |