summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fstab.py5
-rw-r--r--iw/rootpartition.py5
-rw-r--r--kickstart.py3
-rw-r--r--po/anaconda.pot80
-rw-r--r--textw/partitioning.py56
5 files changed, 82 insertions, 67 deletions
diff --git a/fstab.py b/fstab.py
index d038d7f22..41c2499a3 100644
--- a/fstab.py
+++ b/fstab.py
@@ -197,8 +197,6 @@ class Fstab:
# naturally
(devices, raid) = self.ddruid.partitionList()
- print 'in make filesystems'
-
if raid:
self.createRaidTab("/tmp/raidtab", "/tmp", createDevices = 1)
@@ -223,13 +221,10 @@ class Fstab:
else:
kernelPart = '/'
- print 'mount list is', self.mountList()
-
for (mntpoint, device, fsystem, doFormat, size) in self.mountList():
if not doFormat: continue
isys.makeDevInode(device, '/tmp/' + device)
if fsystem == "ext2":
- print '\tcreating filesystem on', device
args = [ "mke2fs", '/tmp/' + device ]
# FORCE the partition that MILO has to read
# to have 1024 block size. It's the only
diff --git a/iw/rootpartition.py b/iw/rootpartition.py
index 59c1a0971..bb113186e 100644
--- a/iw/rootpartition.py
+++ b/iw/rootpartition.py
@@ -154,7 +154,10 @@ class AutoPartitionWindow(InstallWindow):
return
if not todo.getPartitionWarningText():
- self.fstab.setRunDruid(0)
+ self.todo.fstab.setRunDruid(0)
+ self.todo.fstab.setDruid(self.druid)
+ self.todo.fstab.formatAllFilesystems()
+ self.todo.instClass.addToSkipList("format")
return
label = \
diff --git a/kickstart.py b/kickstart.py
index 72533e6d9..2590eb827 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -326,9 +326,6 @@ class Kickstart(InstallClass):
else:
self.partitions.append((extra[0], size, maxSize, grow))
- self.addToSkipList("partition")
- self.addToSkipList("format")
-
def __init__(self, file):
InstallClass.__init__(self)
self.addToSkipList("bootdisk")
diff --git a/po/anaconda.pot b/po/anaconda.pot
index 5cdd11ae1..0ee9a826d 100644
--- a/po/anaconda.pot
+++ b/po/anaconda.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 1999-12-22 10:35-0500\n"
+"POT-Creation-Date: 1999-12-22 16:57-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -14,44 +14,48 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: ENCODING\n"
-#: ../fstab.py:129 ../fstab.py:255
+#: ../fstab.py:128 ../fstab.py:249
msgid "Formatting"
msgstr ""
-#: ../fstab.py:130
+#: ../fstab.py:129
#, c-format
msgid "Formatting swap space on /dev/%s..."
msgstr ""
-#: ../fstab.py:192 ../fstab.py:286 ../libfdisk/newtfsedit.c:1540
-#: ../loader/devices.c:178 ../loader/devices.c:183 ../loader/loader.c:471
-#: ../loader/loader.c:481 ../loader/loader.c:697 ../loader/loader.c:742
-#: ../loader/loader.c:880 ../loader/loader.c:885 ../loader/loader.c:1621
-#: ../loader/loader.c:1667 ../loader/loader.c:1738 ../loader/urls.c:206
-#: ../loader/urls.c:211 ../text.py:234 ../text.py:694 ../todo.py:880
-#: ../todo.py:1206
+#: ../fstab.py:141 ../fstab.py:191 ../fstab.py:280
+#: ../libfdisk/newtfsedit.c:1540 ../loader/devices.c:178
+#: ../loader/devices.c:183 ../loader/loader.c:471 ../loader/loader.c:481
+#: ../loader/loader.c:697 ../loader/loader.c:742 ../loader/loader.c:880
+#: ../loader/loader.c:885 ../loader/loader.c:1621 ../loader/loader.c:1667
+#: ../loader/loader.c:1738 ../loader/urls.c:206 ../loader/urls.c:211
+#: ../text.py:234 ../text.py:694 ../todo.py:880 ../todo.py:1206
msgid "Error"
msgstr ""
-#: ../fstab.py:193
+#: ../fstab.py:141
+msgid "Error creating swap on device "
+msgstr ""
+
+#: ../fstab.py:192
#, c-format
msgid "Error unmounting %s: %s"
msgstr ""
-#: ../fstab.py:206 ../todo.py:523
+#: ../fstab.py:203 ../todo.py:523
msgid "Creating"
msgstr ""
-#: ../fstab.py:206
+#: ../fstab.py:203
msgid "Creating RAID devices..."
msgstr ""
-#: ../fstab.py:256
+#: ../fstab.py:250
#, c-format
msgid "Formatting %s filesystem..."
msgstr ""
-#: ../fstab.py:287
+#: ../fstab.py:281
#, c-format
msgid "Error mounting %s: %s"
msgstr ""
@@ -75,7 +79,7 @@ msgstr ""
#: ../textw/lilo.py:78 ../textw/lilo.py:85 ../textw/lilo.py:160
#: ../textw/packages.py:20 ../textw/packages.py:85 ../textw/packages.py:136
#: ../textw/packages.py:145 ../textw/partitioning.py:23
-#: ../textw/partitioning.py:63 ../textw/partitioning.py:189
+#: ../textw/partitioning.py:63 ../textw/partitioning.py:205
#: ../textw/silo.py:26 ../textw/silo.py:86 ../textw/silo.py:185
#: ../textw/timezone.py:63 ../textw/userauth.py:29 ../textw/userauth.py:141
#: ../textw/userauth.py:172 ../textw/userauth.py:244
@@ -152,7 +156,7 @@ msgstr ""
#: ../text.py:639 ../text.py:653 ../text.py:673 ../text.py:686 ../text.py:698
#: ../text.py:893 ../text.py:897 ../text.py:1087 ../textw/lilo.py:26
#: ../textw/lilo.py:78 ../textw/packages.py:20 ../textw/packages.py:85
-#: ../textw/packages.py:136 ../textw/partitioning.py:189 ../textw/silo.py:25
+#: ../textw/packages.py:136 ../textw/partitioning.py:205 ../textw/silo.py:25
#: ../textw/silo.py:86 ../textw/timezone.py:63 ../textw/userauth.py:29
#: ../textw/userauth.py:43 ../textw/userauth.py:48 ../textw/userauth.py:82
#: ../textw/userauth.py:94 ../textw/userauth.py:102 ../textw/userauth.py:111
@@ -288,7 +292,7 @@ msgstr ""
#: ../libfdisk/newtfsedit.c:1478 ../libfdisk/newtfsedit.c:1496
#: ../libfdisk/newtfsedit.c:1581 ../loader/loader.c:603 ../loader/net.c:703
#: ../text.py:272 ../text.py:449 ../text.py:467 ../text.py:474
-#: ../textw/partitioning.py:154
+#: ../textw/partitioning.py:170
msgid "Yes"
msgstr ""
@@ -299,7 +303,7 @@ msgstr ""
#: ../libfdisk/newtfsedit.c:1478 ../libfdisk/newtfsedit.c:1496
#: ../libfdisk/newtfsedit.c:1581 ../loader/net.c:703 ../text.py:272
#: ../text.py:277 ../text.py:449 ../text.py:467 ../text.py:477
-#: ../textw/partitioning.py:154
+#: ../textw/partitioning.py:170
msgid "No"
msgstr ""
@@ -1154,22 +1158,22 @@ msgstr ""
msgid "Disk Druid"
msgstr ""
-#: ../iw/rootpartition.py:43 ../textw/partitioning.py:149
+#: ../iw/rootpartition.py:43 ../textw/partitioning.py:165
msgid "Low Memory"
msgstr ""
-#: ../iw/rootpartition.py:44 ../textw/partitioning.py:150
+#: ../iw/rootpartition.py:44 ../textw/partitioning.py:166
msgid ""
"As you don't have much memory in this machine, we need to turn on swap space "
"immediately. To do this we'll have to write your new partition table to the "
"disk immediately. Is that okay?"
msgstr ""
-#: ../iw/rootpartition.py:98 ../textw/partitioning.py:116
+#: ../iw/rootpartition.py:98 ../textw/partitioning.py:120
msgid "Automatic Partitioning"
msgstr ""
-#: ../iw/rootpartition.py:161 ../textw/partitioning.py:117
+#: ../iw/rootpartition.py:161 ../textw/partitioning.py:121
#, c-format
msgid ""
"%s\n"
@@ -1183,7 +1187,7 @@ msgstr ""
msgid "Remove data"
msgstr ""
-#: ../iw/rootpartition.py:178 ../textw/partitioning.py:121
+#: ../iw/rootpartition.py:178 ../textw/partitioning.py:125
msgid "Manually partition"
msgstr ""
@@ -1346,11 +1350,11 @@ msgstr ""
msgid "Done"
msgstr ""
-#: ../textw/partitioning.py:121 ../textw/partitioning.py:122
+#: ../textw/partitioning.py:125 ../textw/partitioning.py:126
msgid "Continue"
msgstr ""
-#: ../textw/partitioning.py:169
+#: ../textw/partitioning.py:185
msgid ""
"What partitions would you like to format? We strongly suggest formatting all "
"of the system partitions, including /, /usr, and /var. There is no need to "
@@ -1358,11 +1362,11 @@ msgid ""
"previous install."
msgstr ""
-#: ../textw/partitioning.py:186
+#: ../textw/partitioning.py:202
msgid "Check for bad blocks during format"
msgstr ""
-#: ../textw/partitioning.py:191
+#: ../textw/partitioning.py:207
msgid "Choose Partitions to Format"
msgstr ""
@@ -1899,45 +1903,45 @@ msgstr ""
msgid "<not set>"
msgstr ""
-#: ../libfdisk/gnomefsedit.c:3067
+#: ../libfdisk/gnomefsedit.c:3069
msgid "Unallocated Partitions Exist..."
msgstr ""
-#: ../libfdisk/gnomefsedit.c:3073 ../libfdisk/gnomefsedit.c:3087
+#: ../libfdisk/gnomefsedit.c:3075 ../libfdisk/gnomefsedit.c:3089
msgid ""
"You must assign a root (/) partition to a Linux native partition (ext2) or a "
"RAID partition for the install to proceed."
msgstr ""
-#: ../libfdisk/gnomefsedit.c:3161
+#: ../libfdisk/gnomefsedit.c:3163
msgid "Partitions"
msgstr ""
-#: ../libfdisk/gnomefsedit.c:3205
+#: ../libfdisk/gnomefsedit.c:3207
msgid "_Add..."
msgstr ""
-#: ../libfdisk/gnomefsedit.c:3217
+#: ../libfdisk/gnomefsedit.c:3219
msgid "_Edit..."
msgstr ""
-#: ../libfdisk/gnomefsedit.c:3218
+#: ../libfdisk/gnomefsedit.c:3220
msgid "_Delete"
msgstr ""
-#: ../libfdisk/gnomefsedit.c:3219
+#: ../libfdisk/gnomefsedit.c:3221
msgid "_Reset"
msgstr ""
-#: ../libfdisk/gnomefsedit.c:3248
+#: ../libfdisk/gnomefsedit.c:3250
msgid "_Make RAID Device"
msgstr ""
-#: ../libfdisk/gnomefsedit.c:3257
+#: ../libfdisk/gnomefsedit.c:3259
msgid "Auto Partition"
msgstr ""
-#: ../libfdisk/gnomefsedit.c:3270
+#: ../libfdisk/gnomefsedit.c:3272
msgid "Drive Summary"
msgstr ""
diff --git a/textw/partitioning.py b/textw/partitioning.py
index 6b569315f..f3d8eaec7 100644
--- a/textw/partitioning.py
+++ b/textw/partitioning.py
@@ -98,20 +98,24 @@ class ManualPartitionWindow:
class AutoPartitionWindow:
def __call__(self, screen, todo):
- fstab = []
- for mntpoint, (dev, fstype, reformat) in todo.mounts.items ():
- fstab.append ((dev, mntpoint))
-
- if not todo.ddruid:
- drives = todo.drives.available ().keys ()
- drives.sort (isys.compareDrives)
- todo.ddruid = fsedit(0, drives, fstab, todo.zeroMbr,
- todo.ddruidReadOnly)
- if not todo.instClass.finishPartitioning(todo.ddruid):
- todo.log ("Autopartitioning FAILED\n")
-
- if not todo.getPartitionWarningText():
- return INSTALL_NOOP
+ druid = None
+
+ if todo.instClass.partitions:
+ druid = \
+ todo.fstab.attemptPartitioning(todo.instClass.partitions,
+ todo.instClass.clearParts)
+
+ if not druid:
+ # auto partitioning failed
+ todo.fstab.setRunDruid(1)
+ return
+
+ if not todo.getPartitionWarningText():
+ todo.fstab.setRunDruid(0)
+ todo.fstab.setDruid(druid)
+ todo.fstab.formatAllFilesystems()
+ todo.instClass.addToSkipList("format")
+ return
(rc, choice) = ListboxChoiceWindow(screen, _("Automatic Partitioning"),
_("%s\n\nIf you don't want to do this, you can continue with "
@@ -121,20 +125,32 @@ class AutoPartitionWindow:
[_("Continue"), _("Manually partition")],
buttons = basicButtons, default = _("Continue"))
- if (rc == "back"): return INSTALL_BACK
+ if (rc == "back"):
+ # This happens automatically when we go out of scope, but it's
+ # important so let's be explicit
+ druid = None
+ return INSTALL_BACK
if (choice == 1):
- drives = todo.drives.available ().keys ()
- drives.sort (isys.compareDrives)
- todo.ddruid = fsedit(0, drives, fstab, 0, todo.ddruidReadOnly)
- todo.manuallyPartition()
+ todo.fstab.setRunDruid(1)
+ todo.fstab.rescanPartitions()
+ todo.instClass.removeFromSkipList("format")
+ else:
+ todo.fstab.setRunDruid(0)
+ todo.fstab.setDruid(druid)
+ todo.fstab.formatAllFilesystems()
+ todo.instClass.addToSkipList("format")
class PartitionWindow:
def __call__(self, screen, todo):
dir = INSTALL_NOOP
- if not todo.getSkipPartitioning():
+ if todo.fstab.getRunDruid():
dir = todo.fstab.runDruid()
+ # runDruid returns None when it means INSTALL_OK
+ if not dir:
+ dir = INSTALL_OK
+
return dir
class TurnOnSwapWindow: