[PATCH] Make upgradeany boot option work again (#513227)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 iw/examine_gui.py |    3 ++-
 rescue.py         |    2 +-
 upgrade.py        |    7 ++++---
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/iw/examine_gui.py b/iw/examine_gui.py
index 3a62e06..20af0c7 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, 
+                                                                   upgradeany=flags.cmdline.has_key("upgradeany"))
             upgrade.setUpgradeRoot(self.anaconda)
 
         self.parts = self.anaconda.id.rootParts 
diff --git a/rescue.py b/rescue.py
index 11da108..fe2d181 100644
--- a/rescue.py
+++ b/rescue.py
@@ -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 c8b6757..43400b3 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, 
+                                                  upgradeany=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 []
 
-- 
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux