diff options
-rw-r--r-- | dispatch.py | 2 | ||||
-rw-r--r-- | installclasses/upgradeclass.py | 1 | ||||
-rw-r--r-- | installclasses/upgradeonly.py | 1 | ||||
-rw-r--r-- | iw/examine_gui.py | 6 | ||||
-rw-r--r-- | kickstart.py | 14 | ||||
-rw-r--r-- | textw/upgrade_text.py | 4 | ||||
-rw-r--r-- | upgrade.py | 6 | ||||
-rw-r--r-- | upgradeclass.py | 1 |
8 files changed, 28 insertions, 7 deletions
diff --git a/dispatch.py b/dispatch.py index 8cc5fcc4d..45fc8dd6f 100644 --- a/dispatch.py +++ b/dispatch.py @@ -30,6 +30,7 @@ from bootloader import writeBootloader, bootloaderSetupChoices from flags import flags from upgrade import upgradeFindPackages, upgradeMountFilesystems from upgrade import upgradeSwapSuggestion, upgradeMigrateFind +from upgrade import findRootParts # These are all of the install steps, in order. Note that upgrade and # install steps are the same thing! Upgrades skip install steps, while @@ -51,6 +52,7 @@ installSteps = [ ("reconfigwelcome", ()), ("reconfigkeyboard", ("id.instLanguage", "id.keyboard")), ("installtype", ("dispatch", "id", "method", "intf")), + ("findrootparts", findRootParts, ("intf", "id", "instPath")), ("findinstall", ("dispatch", "intf", "id", "instPath")), ("partitionmethod", ("id.partitions", "id.instClass")), ("partitionobjinit", partitionObjectsInitialize, ("id.diskset", diff --git a/installclasses/upgradeclass.py b/installclasses/upgradeclass.py index 033c7e8c1..d47c3c5b1 100644 --- a/installclasses/upgradeclass.py +++ b/installclasses/upgradeclass.py @@ -21,6 +21,7 @@ class InstallClass(BaseInstallClass): "mouse", "welcome", "installtype", + "findrootparts", "findinstall", "partitionobjinit", "upgrademount", diff --git a/installclasses/upgradeonly.py b/installclasses/upgradeonly.py index 682ce5228..48ff31d37 100644 --- a/installclasses/upgradeonly.py +++ b/installclasses/upgradeonly.py @@ -15,6 +15,7 @@ class InstallClass(BaseInstallClass): def setSteps(self, dispatch): dispatch.setStepList( "mouse", + "findrootparts", "findinstall", "partitionobjinit", "upgrademount", diff --git a/iw/examine_gui.py b/iw/examine_gui.py index 727673585..4e88761e5 100644 --- a/iw/examine_gui.py +++ b/iw/examine_gui.py @@ -16,7 +16,7 @@ class UpgradeExamineWindow (InstallWindow): self.root = newPart def getNext (self): - self.id.upgradeRoot = self.root + self.id.upgradeRoot = [self.root] if self.individualPackages.get_active(): self.dispatch.skipStep("indivpackage", skip = 0) else: @@ -30,9 +30,9 @@ class UpgradeExamineWindow (InstallWindow): self.intf = intf self.id = id self.chroot = chroot - - self.parts = findExistingRoots(intf, id, chroot) + self.parts = self.id.upgradeRoot + box = GtkVBox (FALSE) if not self.parts: box.pack_start (GtkLabel (_("You don't have any Linux partitions." diff --git a/kickstart.py b/kickstart.py index 16321a5a9..2ceb3d90c 100644 --- a/kickstart.py +++ b/kickstart.py @@ -775,7 +775,18 @@ class KickstartBase(BaseInstallClass): self.skipSteps.append("autopartition") def setSteps(self, dispatch): - BaseInstallClass.setSteps(self, dispatch) + if self.installType == "upgrade": + from upgradeonly import InstallClass + BaseInstallClass = InstallClass(0) + BaseInstallClass.setSteps(dispatch) + + # we have no way to specify migrating yet + dispatch.skipStep("upgrademigfind") + dispatch.skipStep("upgrademigratefs") + dispatch.skipStep("upgradecontinue") + dispatch.skipStep("findinstall") + else: + BaseInstallClass.setSteps(self, dispatch) if self.interactive or flags.autostep: dispatch.skipStep("installtype") @@ -808,6 +819,7 @@ class KickstartBase(BaseInstallClass): self.preScripts = [] self.installType = "install" + self.id = id self.readKickstart(id, self.file) for script in self.preScripts: diff --git a/textw/upgrade_text.py b/textw/upgrade_text.py index 0a81142af..8758d57b5 100644 --- a/textw/upgrade_text.py +++ b/textw/upgrade_text.py @@ -183,7 +183,7 @@ class UpgradeSwapWindow: class UpgradeExamineWindow: def __call__ (self, screen, dispatch, intf, id, chroot): self.parts = upgrade.findExistingRoots(intf, id, chroot) - parts = upgrade.findExistingRoots (intf, id, chroot) + parts = id.upgradeRoot if not parts: ButtonChoiceWindow(screen, _("Error"), @@ -227,7 +227,7 @@ class UpgradeExamineWindow: if rc == TEXT_BACK_CHECK: return INSTALL_BACK - id.upgradeRoot = root + id.upgradeRoot = [root] # if root is on vfat we want to always display boot floppy screen # otherwise they can't boot! diff --git a/upgrade.py b/upgrade.py index 09b5ca8f3..0c4a79b19 100644 --- a/upgrade.py +++ b/upgrade.py @@ -27,6 +27,10 @@ from partitioning import * from log import log from translate import _ +def findRootParts(intf, id, chroot): + parts = findExistingRoots(intf, id, chroot) + id.upgradeRoot = parts + def findExistingRoots (intf, id, chroot): if not flags.setupFilesystems: return [ (chroot, 'ext2') ] @@ -196,7 +200,7 @@ def upgradeMountFilesystems(intf, rootInfo, oldfsset, instPath): if flags.setupFilesystems: try: - mountRootPartition(intf, rootInfo, oldfsset, instPath, + mountRootPartition(intf, rootInfo[0], oldfsset, instPath, allowDirty = 0) except SystemError, msg: intf.messageWindow(_("Dirty Filesystems"), diff --git a/upgradeclass.py b/upgradeclass.py index 033c7e8c1..d47c3c5b1 100644 --- a/upgradeclass.py +++ b/upgradeclass.py @@ -21,6 +21,7 @@ class InstallClass(BaseInstallClass): "mouse", "welcome", "installtype", + "findrootparts", "findinstall", "partitionobjinit", "upgrademount", |