summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--iw/upgrade_swap_gui.py25
-rw-r--r--textw/upgrade_text.py2
2 files changed, 25 insertions, 2 deletions
diff --git a/iw/upgrade_swap_gui.py b/iw/upgrade_swap_gui.py
index 14951824f..a895df61a 100644
--- a/iw/upgrade_swap_gui.py
+++ b/iw/upgrade_swap_gui.py
@@ -18,6 +18,29 @@ class UpgradeSwapWindow (InstallWindow):
ics.setNextEnabled (1)
ics.readHTML ("upswapfile")
+
+ def getPrev (self):
+ # we're doing an upgrade, offer choice of aborting upgrade.
+ # we can't allow them to go back in install, since we've
+ # started swap and mounted the systems filesystems
+ # if we've already started an upgrade, cannot back out
+ threads_leave()
+ rc = self.todo.intf.messageWindow(_("Proceed with upgrade?"),
+ _("The filesystems of the Linux installation "
+ "you have chosen to upgrade have already been "
+ "mounted. You cannot go back past this point. "
+ "\n\n") +
+ _( "Would you like to continue with the upgrade?"),
+ type = "yesno").getrc()
+ threads_enter()
+
+ if not rc:
+ raise gui.StayOnScreen
+ else:
+ import sys
+ print _("Aborting upgrade")
+ sys.exit(0)
+
def getNext (self):
#-If the user doesn't need to add swap, we don't do anything
if not self.neededSwap:
@@ -55,7 +78,7 @@ class UpgradeSwapWindow (InstallWindow):
else:
threads_leave()
- if not self.todo.setupFilesystems:
+ if self.todo.setupFilesystems:
upgrade.createSwapFile(self.todo.instPath, self.todo.fstab, mnt, val,
self.todo.intf.progressWindow)
self.todo.upgradeFindPackages()
diff --git a/textw/upgrade_text.py b/textw/upgrade_text.py
index 3411beb00..ff83f9bb7 100644
--- a/textw/upgrade_text.py
+++ b/textw/upgrade_text.py
@@ -101,7 +101,7 @@ class UpgradeSwapWindow:
_("The swap file must be between 0 and 2000 MB in size."))
else:
screen.popWindow()
- if not todo.setupFilesystems:
+ if todo.setupFilesystems:
upgrade.createSwapFile(todo.instPath, todo.fstab, mnt, val,
todo.intf.progressWindow)
todo.upgradeFindPackages ()