Jeremy Katz wrote:
This looks fine, but then we probably want to switch out my patch and
have / just follow the default again. I also wonder if it's worth
adding a "get_default_bootfs()" method rather than hard-coding it as
ext3 in all of the definitions for /boot
patch updated with Jeremy's suggestions
---
autopart.py | 9 +++++----
fsset.py | 12 +++++++++++-
installclass.py | 2 +-
iw/partition_ui_helpers_gui.py | 2 ++
4 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/autopart.py b/autopart.py
index 716fb12..6d5facb 100644
--- a/autopart.py
+++ b/autopart.py
@@ -1705,6 +1705,7 @@ def autoCreateLVMPartitionRequests(autoreq):
def getAutopartitionBoot(partitions):
"""Return the proper shorthand for the boot dir (arch dependent)."""
+ fsname = fsset.fileSystemTypeGetDefaultBoot().getName()
if iutil.isEfi():
ret = [ ["/boot/efi", "efi", 50, 200, 1, 1, 0] ]
for req in partitions.requests:
@@ -1712,20 +1713,20 @@ def getAutopartitionBoot(partitions):
and not req.mountpoint:
req.mountpoint = "/boot/efi"
ret = []
- ret.append(("/boot", None, 200, None, 0, 1, 0))
+ ret.append(("/boot", fsname, 200, None, 0, 1, 0))
return ret
elif (iutil.getPPCMachine() == "pSeries"):
return [ (None, "PPC PReP Boot", 4, None, 0, 1, 0),
- ("/boot", None, 200, None, 0, 1, 0) ]
+ ("/boot", fsname, 200, None, 0, 1, 0) ]
elif (iutil.getPPCMachine() == "iSeries") and not
iutil.hasiSeriesNativeStorage():
return [ (None, "PPC PReP Boot", 16, None, 0, 1, 0) ]
elif (iutil.getPPCMachine() == "iSeries") and
iutil.hasiSeriesNativeStorage():
return []
elif (iutil.getPPCMachine() == "PMac") and iutil.getPPCMacGen() ==
"NewWorld":
return [ ( None, "Apple Bootstrap", 1, 1, 0, 1, 0),
- ("/boot", None, 200, None, 0, 1, 0) ]
+ ("/boot", fsname, 200, None, 0, 1, 0) ]
else:
- return [ ("/boot", None, 200, None, 0, 1, 0) ]
+ return [ ("/boot", fsname, 200, None, 0, 1, 0) ]
# XXX hack but these are common strings to TUI and GUI
diff --git a/fsset.py b/fsset.py
index bb8b2a2..5d09ca4 100644
--- a/fsset.py
+++ b/fsset.py
@@ -69,13 +69,23 @@ if iutil.isEfi():
fileSystemTypes = {}
def fileSystemTypeGetDefault():
+ if fileSystemTypeGet('ext4').isSupported():
+ return fileSystemTypeGet('ext4')
if fileSystemTypeGet('ext3').isSupported():
return fileSystemTypeGet('ext3')
elif fileSystemTypeGet('ext2').isSupported():
return fileSystemTypeGet('ext2')
else:
- raise ValueError, "You have neither ext3 or ext2 support in
your kernel!"
+ raise ValueError, "None of ext4, ext3 or ext2 is supported in
your kernel!"
+def fileSystemTypeGetDefaultBoot():
+ if fileSystemTypeGet('ext3').isSupported():
+ return fileSystemTypeGet('ext3')
+ elif fileSystemTypeGet('ext2').isSupported():
+ return fileSystemTypeGet('ext2')
+ else:
+ raise ValueError, "You have neither ext3 or ext2 support in
your kernel!"
+
def fileSystemTypeGet(key):
if fileSystemTypes.has_key(key):
diff --git a/installclass.py b/installclass.py
index 778a6ec..c36e9e9 100644
--- a/installclass.py
+++ b/installclass.py
@@ -190,7 +190,7 @@ class BaseInstallClass(object):
def setDefaultPartitioning(self, partitions, clear =
CLEARPART_TYPE_LINUX,
doClear = 1, useLVM = True):
- autorequests = [ ("/", "ext4", 1024, None, 1, 1, 1) ]
+ autorequests = [ ("/", None, 1024, None, 1, 1, 1) ]
bootreq = getAutopartitionBoot(partitions)
if bootreq:
diff --git a/iw/partition_ui_helpers_gui.py b/iw/partition_ui_helpers_gui.py
index e2ef4a7..a08da72 100644
--- a/iw/partition_ui_helpers_gui.py
+++ b/iw/partition_ui_helpers_gui.py
@@ -217,6 +217,8 @@ def createFSTypeMenu(fstype, fstypechangeCB, mountCombo,
def mountptchangeCB(widget, fstypecombo):
if iutil.isEfi() and widget.get_children()[0].get_text() ==
"/boot/efi":
fstypecombo.set_active_text("efi")
+ if widget.get_children()[0].get_text() == "/boot":
+
fstypecombo.set_active_text(fileSystemTypeGetDefaultBoot().getName())
def resizeOptionCB(widget, resizesb):
resizesb.set_sensitive(widget.get_active())
--
1.5.4.3
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list