summaryrefslogtreecommitdiffstats
path: root/textw
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-12-18 16:37:51 -0500
committerChris Lumens <clumens@redhat.com>2010-02-04 14:07:30 -0500
commit479defc726e4c1ae665258e7fc80e4ff159698ee (patch)
tree5a4b196b150c73e5c2dcf3965e63676713de4b86 /textw
parent39a52ed1ddb2c4db05045955ccf9ba6066637807 (diff)
downloadanaconda-479defc726e4c1ae665258e7fc80e4ff159698ee.tar.gz
anaconda-479defc726e4c1ae665258e7fc80e4ff159698ee.tar.xz
anaconda-479defc726e4c1ae665258e7fc80e4ff159698ee.zip
Move upgrade-related data to the Anaconda object.
This also removes the hack where upgrade can be True, False, or None in order to test whether we've seen the upgrade screen or not. Instead, it introduces a global value hack. I consider this the slightly cleaner approach.
Diffstat (limited to 'textw')
-rw-r--r--textw/upgrade_text.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/textw/upgrade_text.py b/textw/upgrade_text.py
index 4de534e88..a7435388d 100644
--- a/textw/upgrade_text.py
+++ b/textw/upgrade_text.py
@@ -32,6 +32,8 @@ _ = lambda x: gettext.ldgettext("anaconda", x)
import logging
log = logging.getLogger("anaconda")
+seenExamineScreen = False
+
class UpgradeMigrateFSWindow:
def __call__ (self, screen, anaconda):
@@ -98,7 +100,7 @@ class UpgradeMigrateFSWindow:
class UpgradeSwapWindow:
def __call__ (self, screen, anaconda):
- (fsList, suggSize, suggDev) = anaconda.id.upgradeSwapInfo
+ (fsList, suggSize, suggDev) = anaconda.upgradeSwapInfo
ramDetected = iutil.memInstalled()/1024
@@ -201,7 +203,7 @@ class UpgradeSwapWindow:
class UpgradeExamineWindow:
def __call__ (self, screen, anaconda):
- parts = anaconda.id.rootParts
+ parts = anaconda.rootParts
height = min(len(parts), 11) + 1
if height == 12:
@@ -211,7 +213,9 @@ class UpgradeExamineWindow:
partList = []
partList.append(_("Reinstall System"))
- if (anaconda.id.upgrade == None and anaconda.dispatch.stepInSkipList("installtype")) or anaconda.id.upgrade:
+ global seenExamineScreen
+
+ if (not seenExamineScreen and anaconda.dispatch.stepInSkipList("installtype")) or anaconda.upgrade:
default = 1
else:
default = 0
@@ -241,13 +245,14 @@ class UpgradeExamineWindow:
if root is not None:
upgrade.setSteps(anaconda)
- anaconda.id.setUpgrade(True)
+ anaconda.upgrade = True
- anaconda.id.upgradeRoot = [(root[0], root[1])]
- anaconda.id.rootParts = parts
+ anaconda.upgradeRoot = [(root[0], root[1])]
+ anaconda.rootParts = parts
anaconda.dispatch.skipStep("installtype", skip = 1)
else:
anaconda.dispatch.skipStep("installtype", skip = 0)
- anaconda.id.upgradeRoot = None
+ anaconda.upgradeRoot = None
+ seenExamineScreen = True
return INSTALL_OK