summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2001-03-17 01:05:19 +0000
committerMike Fulbright <msf@redhat.com>2001-03-17 01:05:19 +0000
commit5a969094b55d63b6eb4c0d689551b7d026da8f54 (patch)
tree22c48d7beba0ad200b00a6829dd5c6b7a1849875
parent74c017f6349fe9974eadd5eebc74359a1006d514 (diff)
downloadanaconda-5a969094b55d63b6eb4c0d689551b7d026da8f54.tar.gz
anaconda-5a969094b55d63b6eb4c0d689551b7d026da8f54.tar.xz
anaconda-5a969094b55d63b6eb4c0d689551b7d026da8f54.zip
Fixed screens so in GUI you cannot go back too far once you start down the upgrade path. I've tested this extensively and this could probably be done better, but at least it works.
-rwxr-xr-xgui.py3
-rw-r--r--installclass.py2
-rw-r--r--iw/examine_gui.py24
-rw-r--r--iw/installpath_gui.py2
-rw-r--r--iw/lilo_gui.py19
-rw-r--r--iw/package_gui.py22
-rw-r--r--iw/upgrade_swap_gui.py15
-rw-r--r--textw/upgrade_text.py2
8 files changed, 59 insertions, 30 deletions
diff --git a/gui.py b/gui.py
index 117b65a9e..c6a6f98cc 100755
--- a/gui.py
+++ b/gui.py
@@ -15,6 +15,8 @@ from GDK import *
import time
import glob
+from log import log
+
StayOnScreen = "stayOnScreen"
im = None
@@ -595,6 +597,7 @@ class InstallControlWindow:
# entirely, we continue advancing in direction given
if (self.stateTagByWindow.has_key(screen)
and self.todo.instClass.skipStep(self.stateTagByWindow[screen])):
+ log("skipping step screen %s", screen)
direction ()
return
diff --git a/installclass.py b/installclass.py
index 78ed94a47..fe1403631 100644
--- a/installclass.py
+++ b/installclass.py
@@ -123,7 +123,7 @@ class BaseInstallClass:
"accounts", "dependencies", "language", "keyboard", "xconfig",
"welcome", "custom-upgrade", "installtype", "mouse",
"confirm-install", "confirm-upgrade", "languagesupport",
- "languagedefault", "lba32warning" ].index(type)
+ "languagedefault", "lba32warning", "indivpackage" ].index(type)
self.skipSteps[type] = 1
def setHostname(self, hostname):
diff --git a/iw/examine_gui.py b/iw/examine_gui.py
index 609fbe328..5892aa5d2 100644
--- a/iw/examine_gui.py
+++ b/iw/examine_gui.py
@@ -19,10 +19,19 @@ class UpgradeExamineWindow (InstallWindow):
self.todo.upgradeMountFilesystems (self.root)
threads_enter ()
+# do this via skiplist, made individialpackageselectionwindow a member
+# of upgrade steps.
+#
+# if self.individualPackages.get_active ():
+# # XXX fix me
+# from package_gui import IndividualPackageSelectionWindow
+# return IndividualPackageSelectionWindow
+
if self.individualPackages.get_active ():
- # XXX fix me
- from package_gui import IndividualPackageSelectionWindow
- return IndividualPackageSelectionWindow
+ self.todo.instClass.removeFromSkipList("indivpackage")
+ else:
+ self.todo.instClass.addToSkipList("indivpackage")
+
return None
#UpgradeExamineWindow tag = "upgrade"
@@ -69,9 +78,16 @@ class UpgradeExamineWindow (InstallWindow):
# if there is only one partition, go on.
self.ics.setNextEnabled (TRUE)
self.root = self.parts[0]
+ label = GtkLabel (_("Upgrading the Red Hat Linux installation on partition /dev/") + self.root[0] + "\n\n")
+ label.set_alignment(0.0, 0.5)
+ vbox.pack_start(label, FALSE)
self.individualPackages = GtkCheckButton (_("Customize packages to be upgraded"))
- self.individualPackages.set_active (FALSE)
+ if self.todo.instClass.skipStep("indivpackage"):
+ self.individualPackages.set_active (FALSE)
+ else:
+ self.individualPackages.set_active (TRUE)
+
align = GtkAlignment (0.0, 0.5)
align.add (self.individualPackages)
diff --git a/iw/installpath_gui.py b/iw/installpath_gui.py
index a65e6513e..55717d43a 100644
--- a/iw/installpath_gui.py
+++ b/iw/installpath_gui.py
@@ -76,6 +76,7 @@ class InstallPathWindow (InstallWindow):
self.upgradeSteps = [
( UpgradeExamineWindow, "custom-upgrade"),
( UpgradeSwapWindow, "System Swap Space"),
+ ( IndividualPackageSelectionWindow, "indivpackage"),
( BootloaderWindow, BootloaderSkipname ),
UnresolvedDependenciesWindow,
( ConfirmWindow, "confirm" ),
@@ -115,6 +116,7 @@ class InstallPathWindow (InstallWindow):
self.todo.upgrade = 1
icw.setStateList (self.commonSteps +
self.upgradeSteps, len (self.commonSteps)-1)
+ self.todo.instClass.addToSkipList("indivpackage")
else:
icw.setStateList (self.commonSteps +
self.installSteps, len (self.commonSteps)-1)
diff --git a/iw/lilo_gui.py b/iw/lilo_gui.py
index 9a705c516..a6aba1bfa 100644
--- a/iw/lilo_gui.py
+++ b/iw/lilo_gui.py
@@ -7,6 +7,7 @@ from xpms_gui import CHECKBOX_ON_XPM
from xpms_gui import CHECKBOX_OFF_XPM
import GdkImlib
import iutil
+from package_gui import queryUpgradeContinue
import gui
if iutil.getArch() == 'i386':
@@ -45,18 +46,12 @@ class LiloWindow (InstallWindow):
# 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
- if self.todo.upgrade:
- 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 we are skipping indivual package selection, must stop it here
+ # very messy.
+ #
+ if self.todo.upgrade and self.todo.instClass.skipStep("indivpackage"):
+ rc = queryUpgradeContinue(self.todo.intf)
if not rc:
raise gui.StayOnScreen
else:
diff --git a/iw/package_gui.py b/iw/package_gui.py
index 84ebe58cb..1a046a3ba 100644
--- a/iw/package_gui.py
+++ b/iw/package_gui.py
@@ -5,6 +5,7 @@ from string import *
from thread import *
from examine_gui import *
import rpm
+import gui
import GdkImlib
import GtkExtra
import string
@@ -16,6 +17,18 @@ import time
from threading import *
import os
+def queryUpgradeContinue(intf):
+ threads_leave()
+ rc = 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()
+ return rc
+
class IndividualPackageSelectionWindow (InstallWindow):
def __init__ (self, ics):
@@ -40,7 +53,14 @@ class IndividualPackageSelectionWindow (InstallWindow):
if isinstance (x, PackageSelectionWindow):
return PackageSelectionWindow
elif isinstance (x, UpgradeExamineWindow):
- return UpgradeExamineWindow
+ rc = queryUpgradeContinue(self.todo.intf)
+ if not rc:
+ raise gui.StayOnScreen
+ else:
+ import sys
+ print _("Aborting upgrade")
+ sys.exit(0)
+
return None
diff --git a/iw/upgrade_swap_gui.py b/iw/upgrade_swap_gui.py
index a895df61a..0a745e856 100644
--- a/iw/upgrade_swap_gui.py
+++ b/iw/upgrade_swap_gui.py
@@ -7,6 +7,7 @@ import iutil
from log import log
import upgrade
from gnome.ui import *
+from package_gui import queryUpgradeContinue
import gui
class UpgradeSwapWindow (InstallWindow):
@@ -24,15 +25,7 @@ class UpgradeSwapWindow (InstallWindow):
# 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()
+ rc = queryUpgradeContinue(self.todo.intf)
if not rc:
raise gui.StayOnScreen
@@ -98,7 +91,7 @@ class UpgradeSwapWindow (InstallWindow):
threads_leave()
self.todo.upgradeFindPackages ()
threads_enter()
- return None
+ return None
self.neededSwap = 1
self.row = 0
@@ -188,7 +181,7 @@ class UpgradeSwapWindow (InstallWindow):
def swapWrongSize(self):
rc = self.todo.intf.messageWindow(_("Warning"),
- _("The swap file must be between 0 and 2000 MB in size."),
+ _("The swap file must be between 1 and 2000 MB in size."),
type = "okcancel").getrc()
return rc
diff --git a/textw/upgrade_text.py b/textw/upgrade_text.py
index 21577ca62..134be76a9 100644
--- a/textw/upgrade_text.py
+++ b/textw/upgrade_text.py
@@ -98,7 +98,7 @@ class UpgradeSwapWindow:
"selected for the swap partition."))
elif val > 2000 or val < 1:
todo.intf.messageWindow(_("Warning"),
- _("The swap file must be between 0 and 2000 MB in size."))
+ _("The swap file must be between 1 and 2000 MB in size."))
else:
screen.popWindow()
if todo.setupFilesystems: