diff options
author | Matt Wilson <msw@redhat.com> | 2000-01-18 18:06:20 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-01-18 18:06:20 +0000 |
commit | 4f2126d16aaef69417dc68e37443c5a89b53d29e (patch) | |
tree | bca18fbf9efc61fb7bd8402e769536b42ccadf89 /text.py | |
parent | 671e3d84213ca17f9dbb6845c0b0801481b951cc (diff) | |
download | anaconda-4f2126d16aaef69417dc68e37443c5a89b53d29e.tar.gz anaconda-4f2126d16aaef69417dc68e37443c5a89b53d29e.tar.xz anaconda-4f2126d16aaef69417dc68e37443c5a89b53d29e.zip |
turn off swap when upgrades are backed up
Diffstat (limited to 'text.py')
-rw-r--r-- | text.py | 34 |
1 files changed, 22 insertions, 12 deletions
@@ -186,19 +186,12 @@ class InstallPathWindow: if (todo.instClass.installType == "install"): intf.steps = intf.commonSteps + intf.installSteps todo.upgrade = 0 - showScreen = 0 + return INSTALL_NOOP elif (todo.instClass.installType == "upgrade"): intf.steps = intf.commonSteps + intf.upgradeSteps todo.upgrade = 1 - showScreen = 0 - - if not showScreen: - if not todo.fstab: - todo.fstab = NewtFstab(todo.setupFilesystems, - todo.serial, 0, 0, - todo.intf.waitWindow, - todo.intf.messageWindow) return INSTALL_NOOP + showScreen = 0 if (todo.upgrade): default = 4 @@ -262,7 +255,20 @@ class InstallPathWindow: return INSTALL_OK class UpgradeExamineWindow: - def __call__ (self, screen, todo): + def __call__ (self, dir, screen, todo): + from fstab import NewtFstab + + if dir == -1: + # Hack to let backing out of upgrades work properly + if todo.fstab: + todo.fstab.turnOffSwap() + return INSTALL_NOOP + + todo.fstab = NewtFstab(todo.setupFilesystems, + todo.serial, 0, 0, + todo.intf.waitWindow, + todo.intf.messageWindow) + parts = todo.upgradeFindRoot () if not parts: @@ -1115,8 +1121,8 @@ class InstallInterface: [_("Upgrade Complete"), FinishedWindow, (self.screen, todo)] ] - self.steps = self.commonSteps dir = 1 + self.steps = self.commonSteps while self.step >= 0 and self.step < len(self.steps) and self.steps[self.step]: step = self.steps[self.step] @@ -1133,7 +1139,11 @@ class InstallInterface: (self.screen.width - len(self.welcomeText)) * " ") self.screen.drawRootText (0 - len(step[0]), 0, step[0]) - rc = apply (step[1](), step[2]) + # This is *disgusting* (ewt) + if step[1] == UpgradeExamineWindow: + rc = apply (step[1](), (dir,) + step[2]) + else: + rc = apply (step[1](), step[2]) if rc == INSTALL_BACK: dir = -1 |