summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2001-07-10 04:31:24 +0000
committerJeremy Katz <katzj@redhat.com>2001-07-10 04:31:24 +0000
commita6e885de3bd709e05a26e16f3a03ee1ac1202a83 (patch)
treec2f5f56139fe1a06339b0624146f9f32d172da3b
parent40a514a8d6eedf28ce1cdb53739187cea9b56862 (diff)
downloadanaconda-a6e885de3bd709e05a26e16f3a03ee1ac1202a83.tar.gz
anaconda-a6e885de3bd709e05a26e16f3a03ee1ac1202a83.tar.xz
anaconda-a6e885de3bd709e05a26e16f3a03ee1ac1202a83.zip
gracefully handle partitions which we don't understand the fstype of
(and hence, which have an fs type of None). set to foreign fs type and allow formatting of these partitions
-rw-r--r--iw/partition_gui.py35
-rw-r--r--partitioning.py7
-rw-r--r--textw/partition_text.py31
3 files changed, 32 insertions, 41 deletions
diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index 59426b4e2..fc6028981 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -817,25 +817,22 @@ class PartitionWindow(InstallWindow):
maintable.attach(noformatrb, 0, 2, row, row + 1)
row = row + 1
- if ofstype.isFormattable():
- formatrb = GtkRadioButton (label=_("Format partition as:"),
- group = noformatrb)
- formatrb.set_active(0)
- if origrequest.format:
- formatrb.set_active(1)
- elif origrequest.format == None and not origrequest.migrate:
- formatrb.set_active(isFormatOnByDefault(origrequest))
-
- maintable.attach(formatrb, 0, 1, row, row + 1)
- (fstype, fstypeMenu) = createFSTypeMenu(ofstype,fstypechangeCB,
- mountCombo)
- fstype.set_sensitive(formatrb.get_active())
- maintable.attach(fstype, 1, 2, row, row + 1)
- row = row + 1
-
- formatrb.connect("toggled", formatOptionCB, fstype)
- else:
- formatrb = None
+ formatrb = GtkRadioButton (label=_("Format partition as:"),
+ group = noformatrb)
+ formatrb.set_active(0)
+ if origrequest.format:
+ formatrb.set_active(1)
+ elif origrequest.format == None and not origrequest.migrate:
+ formatrb.set_active(isFormatOnByDefault(origrequest))
+
+ maintable.attach(formatrb, 0, 1, row, row + 1)
+ (fstype, fstypeMenu) = createFSTypeMenu(ofstype,fstypechangeCB,
+ mountCombo)
+ fstype.set_sensitive(formatrb.get_active())
+ maintable.attach(fstype, 1, 2, row, row + 1)
+ row = row + 1
+
+ formatrb.connect("toggled", formatOptionCB, fstype)
if origrequest.origfstype.isMigratable():
migraterb = GtkRadioButton (label=_("Migrate partition to:"),
diff --git a/partitioning.py b/partitioning.py
index 5390e6bd9..afcf8afc8 100644
--- a/partitioning.py
+++ b/partitioning.py
@@ -666,7 +666,7 @@ class Partitions:
# XXX this is a hack
format = 1
else:
- ptype = None
+ ptype = fsset.fileSystemTypeGet("foreign")
start = part.geom.start
end = part.geom.end
@@ -1177,11 +1177,6 @@ def doEditPartitionByRequest(intf, requestlist, part):
drive = [ get_partition_drive(part) ])
return ("PARTITION", request)
- elif (part.fs_type == None) or (part.fs_type and not part.fs_type.name):
- intf.messageWindow( _("Filesystem Missing"),
- _("You cannot edit partitions "
- "without a filesystem type."))
- return (None, None)
elif part.type & parted.PARTITION_EXTENDED:
return (None, None)
diff --git a/textw/partition_text.py b/textw/partition_text.py
index 5d7d5ea22..b5a02db10 100644
--- a/textw/partition_text.py
+++ b/textw/partition_text.py
@@ -218,7 +218,8 @@ class PartitionWindow:
if fileSystemTypeGet(name).isFormattable():
fstype.append(name, types[name])
- if request.fstype and request.fstype.getName() in names:
+ if request.fstype and request.fstype.getName() in names and \
+ request.fstype.isFormattable():
fstype.setCurrent(request.fstype)
subgrid.setField(fstype, 0, row)
if usecallback:
@@ -411,22 +412,20 @@ class PartitionWindow:
None, not format and not migrate)
subgrid.setField(noformatrb, 0, srow, (0,0,0,1),anchorLeft = 1)
- if origrequest.fstype and origrequest.fstype.isFormattable():
- srow = srow + 1
- if format:
- forflag = 1
- else:
- forflag = 0
- formatrb = SingleRadioButton(_("Format as:"), noformatrb, forflag)
- subgrid.setField(formatrb, 0, srow, (0,0,0,1), anchorLeft = 1)
-
- (fortype, forgrid) = self.makeFsList(origrequest, usecallback = 0,
- uselabel = 0)
- if newfstype and newfstype.getName() in fileSystemTypeGetTypes().keys():
- fortype.setCurrent(newfstype)
- subgrid.setField(forgrid, 1, srow, (0,0,0,1))
+ srow = srow + 1
+ if format:
+ forflag = 1
else:
- formatrb = None
+ forflag = 0
+ formatrb = SingleRadioButton(_("Format as:"), noformatrb, forflag)
+ subgrid.setField(formatrb, 0, srow, (0,0,0,1), anchorLeft = 1)
+
+ (fortype, forgrid) = self.makeFsList(origrequest, usecallback = 0,
+ uselabel = 0)
+ if newfstype and newfstype.isFormattable() and \
+ newfstype.getName() in fileSystemTypeGetTypes().keys():
+ fortype.setCurrent(newfstype)
+ subgrid.setField(forgrid, 1, srow, (0,0,0,1))
if origrequest.origfstype and origrequest.origfstype.isMigratable():
srow = srow + 1