summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1999-09-01 00:24:43 +0000
committerErik Troan <ewt@redhat.com>1999-09-01 00:24:43 +0000
commit3f92666dcb0171105dfc38eff8b31fec2c983e92 (patch)
treed4bb64bb41c7eeb3fa74c7e473fd22a93c4c788e /iw
parentddb1c1454012411f2636c59d651be3bd98151692 (diff)
downloadanaconda-3f92666dcb0171105dfc38eff8b31fec2c983e92.tar.gz
anaconda-3f92666dcb0171105dfc38eff8b31fec2c983e92.tar.xz
anaconda-3f92666dcb0171105dfc38eff8b31fec2c983e92.zip
changes to make partitioning work in kickstart
Diffstat (limited to 'iw')
-rw-r--r--iw/autopartition.py49
-rw-r--r--iw/rootpartition.py33
2 files changed, 22 insertions, 60 deletions
diff --git a/iw/autopartition.py b/iw/autopartition.py
deleted file mode 100644
index aa600dc95..000000000
--- a/iw/autopartition.py
+++ /dev/null
@@ -1,49 +0,0 @@
-from gtk import *
-from iw import *
-from thread import *
-from gui import _
-
-FSEDIT_CLEAR_LINUX = (1 << 0)
-FSEDIT_CLEAR_ALL = (1 << 2)
-FSEDIT_USE_EXISTING = (1 << 3)
-
-class AutoPartitionWindow (InstallWindow):
-
- def __init__ (self, ics):
- InstallWindow.__init__ (self, ics)
-
- self.todo = ics.getToDo ()
- ics.setTitle (_("Auto partition"))
- ics.setNextEnabled (TRUE)
-
- def getNext (self):
- attempt = [
- ( "/boot", 16, 0x83, 0, -1 ),
- ( "/", 256, 0x83, 0, -1 ),
- ( "/usr", 512, 0x83, 1, -1 ),
- ( "/var", 256, 0x83, 0, -1 ),
- ( "/home", 512, 0x83, 1, -1 ),
- ( "Swap-auto", 64, 0x82, 0, -1 ),
- ]
-
- ret = self.todo.ddruid.attempt (attempt, _("Workstation"), self.type)
- return None
-
- def typeSelected (self, button, data):
- self.type = data
-
- def getScreen (self):
- box = GtkVBox (FALSE)
-
- group = GtkRadioButton (None, _("Remove all data"))
- group.connect ("clicked", self.typeSelected, FSEDIT_CLEAR_ALL)
- box.pack_start (group, FALSE)
- item = GtkRadioButton (group, _("Remove Linux partitions"))
- item.connect ("clicked", self.typeSelected, FSEDIT_CLEAR_LINUX)
- box.pack_start (item, FALSE)
- item = GtkRadioButton (group, _("Use existing free space"))
- item.connect ("clicked", self.typeSelected, FSEDIT_USE_EXISTING)
- box.pack_start (item, FALSE)
- item.set_active (TRUE)
-
- return box
diff --git a/iw/rootpartition.py b/iw/rootpartition.py
index 72ccc9589..957ba308a 100644
--- a/iw/rootpartition.py
+++ b/iw/rootpartition.py
@@ -29,20 +29,21 @@ class PartitionWindow (InstallWindow):
ics.setHTML ("<HTML><BODY>Select a root partition"
"</BODY></HTML>")
ics.setNextEnabled (TRUE)
+ self.skippedScreen = 0
def getNext (self):
- print "calling self.ddruid.next ()"
- self.todo.ddruid.next ()
- print "done calling self.ddruid.next ()"
+ self.todo.ddruid.next ()
- win = self.todo.ddruid.getConfirm ()
- if win:
- print "confirm"
- bin = GtkFrame (None, _obj = win)
- bin.set_shadow_type (SHADOW_NONE)
- window = ConfirmPartitionWindow
- window.window = bin
- return window
+ if not self.skippedScreen:
+
+ win = self.todo.ddruid.getConfirm ()
+ if win:
+ print "confirm"
+ bin = GtkFrame (None, _obj = win)
+ bin.set_shadow_type (SHADOW_NONE)
+ window = ConfirmPartitionWindow
+ window.window = bin
+ return window
fstab = self.todo.ddruid.getFstab ()
for (partition, mount, fsystem, size) in fstab:
@@ -56,13 +57,23 @@ class PartitionWindow (InstallWindow):
def getScreen (self):
from gnomepyfsedit import fsedit
+ if self.skippedScreen:
+ # if we skipped it once, skip it again
+ return None
+
if not self.todo.ddruid:
drives = self.todo.drives.available ().keys ()
drives.sort ()
self.todo.ddruid = \
fsedit(1, drives, [])
+ self.todo.ddruid.next()
self.todo.ddruid.setCallback (self.enableCallback, self)
+ self.todo.instClass.finishPartitioning(self.todo.ddruid)
+ if (self.todo.instClass.skipPartitioning):
+ self.skippedScreen = 1
+ return None
+
self.bin = GtkFrame (None, _obj = self.todo.ddruid.getWindow ())
self.bin.set_shadow_type (SHADOW_NONE)
self.todo.ddruid.edit ()