summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dispatch.py5
-rw-r--r--installclass.py1
-rw-r--r--installclasses/upgradeclass.py1
-rw-r--r--iw/lilo_gui.py3
-rw-r--r--iw/upgrade_swap_gui.py3
-rw-r--r--partitioning.py9
-rw-r--r--text.py3
-rw-r--r--textw/lilo_text.py10
-rw-r--r--textw/upgrade_text.py84
-rw-r--r--upgradeclass.py1
10 files changed, 45 insertions, 75 deletions
diff --git a/dispatch.py b/dispatch.py
index 6499f0824..d418384ad 100644
--- a/dispatch.py
+++ b/dispatch.py
@@ -21,7 +21,7 @@ from packages import handleX11Packages, writeConfiguration, writeXConfiguration
from packages import writeKSConfiguration, turnOnFilesystems
from packages import queryUpgradeContinue
from autopart import doAutoPartition
-from partitioning import partitionMethodSetup
+from partitioning import partitionMethodSetup, partitionObjectsInitialize
from floppy import makeBootdisk
from bootloader import partitioningComplete, writeBootloader
from flags import flags
@@ -49,8 +49,9 @@ installSteps = [
( "installtype", ("dispatch", "id", "method", "intf") ),
( "findinstall", ("dispatch", "intf", "id", "instPath") ),
( "upgradecontinue", queryUpgradeContinue, ("intf", "dir")),
- ( "addswap", ("dispatch", "intf", "id.fsset", "id.diskset", "instPath") ),
+ ( "addswap", ("dispatch", "intf", "id.fsset", "instPath") ),
( "partitionmethod", ("id",) ),
+ ( "partitionobjinit", partitionObjectsInitialize, ("id",) ),
( "partitionmethodsetup", partitionMethodSetup, ("id", "dispatch") ),
( "autopartition", ("id", "id.diskset", "intf") ),
( "autopartitionexecute", doAutoPartition, ("dir", "id", "intf")),
diff --git a/installclass.py b/installclass.py
index 855a14511..3bc0eefcd 100644
--- a/installclass.py
+++ b/installclass.py
@@ -97,6 +97,7 @@ class BaseInstallClass:
"welcome",
"installtype",
"partitionmethod",
+ "partitionobjinit",
"partitionmethodsetup",
"autopartition",
"autopartitionexecute",
diff --git a/installclasses/upgradeclass.py b/installclasses/upgradeclass.py
index 8788d4684..07d940b42 100644
--- a/installclasses/upgradeclass.py
+++ b/installclasses/upgradeclass.py
@@ -22,6 +22,7 @@ class InstallClass(BaseInstallClass):
"welcome",
"installtype",
"findinstall",
+ "partitionobjinit",
"partitiondone",
"addswap",
"upgradecontinue",
diff --git a/iw/lilo_gui.py b/iw/lilo_gui.py
index 173f6e985..97f13616b 100644
--- a/iw/lilo_gui.py
+++ b/iw/lilo_gui.py
@@ -10,9 +10,6 @@ import iutil
from package_gui import queryUpgradeContinue
import gui
-if iutil.getArch() == 'i386':
- import edd
-
class LiloWindow (InstallWindow):
foo = GdkImlib.create_image_from_xpm (CHECKBOX_ON_XPM)
foo.render()
diff --git a/iw/upgrade_swap_gui.py b/iw/upgrade_swap_gui.py
index defc74047..7adf075e9 100644
--- a/iw/upgrade_swap_gui.py
+++ b/iw/upgrade_swap_gui.py
@@ -71,10 +71,9 @@ class UpgradeSwapWindow (InstallWindow):
def clist_cb(self, clist, row, col, data):
self.row = row
- def getScreen (self, dispatch, intf, fsset, diskset, instPath):
+ def getScreen (self, dispatch, intf, fsset, instPath):
self.neededSwap = 0
self.fsset = fsset
- self.diskset = diskset
self.dispatch = dispatch
self.instPath = instPath
self.intf = intf
diff --git a/partitioning.py b/partitioning.py
index 3bc9041dd..fbfa1f4a4 100644
--- a/partitioning.py
+++ b/partitioning.py
@@ -823,6 +823,11 @@ class DiskSet:
part = disk.next_partition(part)
return rc
+def partitionObjectsInitialize(id):
+ # read in drive info
+ id.diskset = DiskSet()
+ id.partrequests = PartitionRequests(id.diskset)
+
def partitionMethodSetup(id, dispatch):
# turn on/off step based on 3 paths:
@@ -833,10 +838,6 @@ def partitionMethodSetup(id, dispatch):
dispatch.skipStep("autopartition", skip = not id.useAutopartitioning)
dispatch.skipStep("autopartitionexecute",skip = not id.useAutopartitioning)
dispatch.skipStep("fdisk", skip = not id.useFdisk)
-
- # read in drive info
- id.diskset = DiskSet()
- id.partrequests = PartitionRequests(id.diskset)
protected = dispatch.method.protectedPartitions()
if protected:
diff --git a/text.py b/text.py
index 96f064eb6..2cf967530 100644
--- a/text.py
+++ b/text.py
@@ -40,6 +40,8 @@ stepToClasses = {
"fdisk" : ("fdisk_text", "fdiskPartitionWindow" ),
"partitionmethod" : ("partmethod_text", ("PartitionMethod") ),
"partition": ("partition_text", ("PartitionWindow") ),
+ "findinstall" : ( "upgrade_text", "UpgradeExamineWindow" ),
+ "addswap" : ( "upgrade_text", "UpgradeSwapWindow" ),
"bootloader" : ("lilo_text", ("LiloAppendWindow",
"LiloWindow",
"LiloImagesWindow" ) ),
@@ -61,7 +63,6 @@ stepToClasses = {
"install" : ( "progress_text", "setupForInstall" ),
"bootdisk" : ( "bootdisk_text", ( "BootDiskWindow",
"MakeBootDiskWindow" ) ),
-# "finishxconfig" : ( "xconfig_text", "XconfiguratorWindow" ),
"complete" : ( "complete_text", "FinishedWindow" ),
"reconfigcomplete" : ( "complete_text", "ReconfigFinishedWindow" ),
}
diff --git a/textw/lilo_text.py b/textw/lilo_text.py
index b624d8211..b65e88e9b 100644
--- a/textw/lilo_text.py
+++ b/textw/lilo_text.py
@@ -5,8 +5,9 @@ from translate import _
from flags import flags
import string
import iutil
-if iutil.getArch() == 'i386':
- import edd
+# XXX
+#if iutil.getArch() == 'i386':
+# import edd
#cat = gettext.Catalog ("anaconda", "/usr/share/locale")
#_ = cat.gettext
@@ -32,8 +33,9 @@ class LiloAppendWindow:
grid = GridFormHelp(screen, _("Bootloader Configuration"), "kernelopts", 1, 4)
grid.add(t, 0, 0, padding = (0, 0, 0, 1))
- if not edd.detect():
- grid.add(cb, 0, 1, padding = (0, 0, 0, 1))
+# XXX
+# if not edd.detect():
+# grid.add(cb, 0, 1, padding = (0, 0, 0, 1))
grid.add(entry, 0, 2, padding = (0, 0, 0, 1))
grid.add(buttons, 0, 3, growx = 1)
diff --git a/textw/upgrade_text.py b/textw/upgrade_text.py
index 89565d5b7..bb7df7468 100644
--- a/textw/upgrade_text.py
+++ b/textw/upgrade_text.py
@@ -8,29 +8,9 @@ from constants_text import *
import upgrade
class UpgradeSwapWindow:
- def __call__ (self, dir, screen, todo):
- if dir == -1:
- # msf dont go back!
- rc = ButtonChoiceWindow(screen, _("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") +
- _("If you would like to exit the upgrade select "
- "Exit, or choose Ok to continue with the "
- "upgrade."),
- [ TEXT_OK_BUTTON, _("Exit") ], width = 50)
-
- if rc == TEXT_OK_CHECK:
- return INSTALL_OK
- else:
- import sys
- sys.exit(0)
-
-
- rc = upgrade.swapSuggestion(todo.instPath, todo.fstab)
+ def __call__ (self, screen, dispatch, intf, fsset, instPath):
+ rc = upgrade.swapSuggestion(instPath, fsset)
if not rc:
- todo.upgradeFindPackages ()
return INSTALL_OK
(fsList, suggSize, suggMntPoint) = rc
@@ -96,7 +76,6 @@ class UpgradeSwapWindow:
return INSTALL_BACK
elif result == "skip":
screen.popWindow()
- todo.upgradeFindPackages ()
return INSTALL_OK
val = amount.value()
@@ -119,34 +98,18 @@ class UpgradeSwapWindow:
else:
screen.popWindow()
if todo.setupFilesystems:
+ # XXX fix me
+ return INSTALL_OK
upgrade.createSwapFile(todo.instPath, todo.fstab,
mnt, val)
- todo.upgradeFindPackages ()
return INSTALL_OK
raise ValueError
class UpgradeExamineWindow:
- def __call__ (self, dir, screen, todo):
- if dir == -1:
- # msf dont go back!
- rc = ButtonChoiceWindow(screen, _("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") +
- _("If you would like to exit the upgrade select "
- "Exit, or choose Ok to continue with the "
- "upgrade."),
- [ TEXT_OK_BUTTON, _("Exit") ], width = 50)
-
- if rc == TEXT_OK_CHECK:
- return INSTALL_OK
- else:
- import sys
- sys.exit(0)
-
- parts = todo.upgradeFindRoot ()
+ def __call__ (self, screen, dispatch, intf, id, chroot):
+ self.parts = upgrade.findExistingRoots(intf, id, chroot)
+ parts = upgrade.findExistingRoots (intf, id, chroot)
if not parts:
ButtonChoiceWindow(screen, _("Error"),
@@ -181,27 +144,29 @@ class UpgradeExamineWindow:
root = parts[0]
(drive, fs) = root
- # terrible hack - need to fix in future
- # if we're skipping confirm upgrade window, we must be in
- # upgradeonly mode, so don't display this window either
- if not todo.instClass.skipStep('confirm-upgrade'):
- rc = ButtonChoiceWindow (screen, _("Upgrade Partition"),
- _("Upgrading the Red Hat Linux installation on partition /dev/%s") % (drive,),
- buttons = [ TEXT_OK_BUTTON, TEXT_BACK_BUTTON ])
- if rc == TEXT_BACK_CHECK:
- return INSTALL_BACK
+ rc = ButtonChoiceWindow (screen, _("Upgrade Partition"),
+ _("Upgrading the Red Hat Linux "
+ "installation on partition "
+ "/dev/%s") % (drive,),
+ buttons = [ TEXT_OK_BUTTON,
+ TEXT_BACK_BUTTON ])
+ if rc == TEXT_BACK_CHECK:
+ return INSTALL_BACK
+
+ upgrade.upgradeMountFilesystems (intf, root, id.fsset, chroot)
- todo.upgradeMountFilesystems (root)
# if root is on vfat we want to always display boot floppy screen
# otherwise they can't boot!
# This check is required for upgradeonly installclass to work so
# we only show boot floppy screen in partitonless install case
- if root[1] == "vfat":
- todo.instClass.removeFromSkipList("bootdisk")
+ # XXX WRONG PLACE TO DO THIS
+ #if root[1] == "vfat":
+ # todo.instClass.removeFromSkipList("bootdisk")
+ return INSTALL_OK
class CustomizeUpgradeWindow:
- def __call__ (self, screen, todo, indiv):
+ def __call__ (self, screen, dispatch):
rc = ButtonChoiceWindow (screen, _("Customize Packages to Upgrade"),
_("The packages you have installed, "
"and any other packages which are "
@@ -210,8 +175,9 @@ class CustomizeUpgradeWindow:
"for installation. Would you like "
"to customize the set of packages "
"that will be upgraded?"),
- buttons = [ _("Yes"), _("No"), TEXT_BACK_BUTTON],
- help = "custupgrade")
+ buttons = [ _("Yes"), _("No"),
+ TEXT_BACK_BUTTON],
+ help = "custupgrade")
if rc == TEXT_BACK_CHECK:
return INSTALL_BACK
diff --git a/upgradeclass.py b/upgradeclass.py
index 8788d4684..07d940b42 100644
--- a/upgradeclass.py
+++ b/upgradeclass.py
@@ -22,6 +22,7 @@ class InstallClass(BaseInstallClass):
"welcome",
"installtype",
"findinstall",
+ "partitionobjinit",
"partitiondone",
"addswap",
"upgradecontinue",