summaryrefslogtreecommitdiffstats
path: root/pyanaconda
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2012-09-11 16:54:27 -0500
committerDavid Lehman <dlehman@redhat.com>2012-09-13 11:13:23 -0500
commit838be319ff39017af99521e322af5d5349c36b5d (patch)
tree3da0dd5a44e1e99931ebaba6644bf0cb9133c8d0 /pyanaconda
parent3a3f2efa710fa7fc405c2ba0c00131c2baf9bb97 (diff)
downloadanaconda-838be319ff39017af99521e322af5d5349c36b5d.tar.gz
anaconda-838be319ff39017af99521e322af5d5349c36b5d.tar.xz
anaconda-838be319ff39017af99521e322af5d5349c36b5d.zip
Allow creation of biosboot and prepboot partitions in the custom spoke.
Also switches the reformat check to use format names instead of types since the names are what we populate the fstype combo with.
Diffstat (limited to 'pyanaconda')
-rw-r--r--pyanaconda/storage/__init__.py4
-rw-r--r--pyanaconda/ui/gui/spokes/custom.py23
-rw-r--r--pyanaconda/ui/gui/spokes/lib/accordion.py3
3 files changed, 21 insertions, 9 deletions
diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index cfabc2de6..7d632ea40 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -1791,8 +1791,8 @@ class Storage(object):
if not mountpoint:
# just return the default
pass
- elif mountpoint.lower() == "swap":
- fstype = "swap"
+ elif mountpoint.lower() in ("swap", "biosboot", "prepboot"):
+ fstype = mountpoint.lower()
elif mountpoint == "/boot":
fstype = self.defaultBootFSType
elif mountpoint == "/boot/efi":
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index e2771c8c0..f4475c20f 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -137,7 +137,8 @@ class AddDialog(GUIObject):
self._error = False
# sure, add whatever you want to this list. this is just a start.
- paths = ["/", "/boot", "/home", "/usr", "/var", "swap"]
+ paths = ["/", "/boot", "/home", "/usr", "/var",
+ "swap", "biosboot", "prepboot"]
store = self.builder.get_object("mountPointStore")
for path in paths:
if path not in self.mountpoints:
@@ -545,6 +546,11 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
swaps = [d for d in new_devices if d.format.type == "swap"]
mounts = dict([(d.format.mountpoint, d) for d in new_devices
if getattr(d.format, "mountpoint", None)])
+
+ for d in new_devices:
+ if d.format.type in ("prepboot", "biosboot"):
+ mounts[d.format.type] = d
+
new_root = Root(mounts=mounts, swaps=swaps, name=new_install_name)
ui_roots.insert(0, new_root)
@@ -627,7 +633,11 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
return _("The 'home' area on your computer is where all your personal\n" \
"data is stored.")
elif name == "BIOS Boot":
- return _("No one knows what this could possibly be for.")
+ return _("The BIOS boot partition is required to enable booting\n"
+ "from GPT-partitioned disks on BIOS hardware.")
+ elif name == "PReP Boot":
+ return _("The PReP boot partition is required as part of the\n"
+ "bootloader configuration on some PPC platforms.")
else:
return ""
@@ -834,7 +844,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# for fstype we'll need to instantiate a new DeviceFormat and schedule
# creation of it
- if fs_type != device.format.type:
+ if fs_type != device.format.name:
self.clear_errors()
with ui_storage_logger():
old_format = device.format
@@ -1046,7 +1056,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
encryptCheckbox.set_active(device.encrypted)
# if the format is swap the device type can't be btrfs
- include_btrfs = device.format.type != "swap"
+ include_btrfs = device.format.type not in ("swap", "prepboot",
+ "biosboot")
# btrfs has to be the last type in the list
btrfs_included = typeCombo.get_model()[-1][0] == "BTRFS"
if include_btrfs and not btrfs_included:
@@ -1134,7 +1145,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
# we're doing nothing here to ensure that bootable requests end up on
# the boot disk, but the weight from platform should take care of this
- if mountpoint.lower() == "swap":
+ if mountpoint.lower() in ("swap", "biosboot", "prepboot"):
mountpoint = None
device_type = self.data.autopart.type
@@ -1142,7 +1153,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
mountpoint == "/boot/efi":
device_type = AUTOPART_TYPE_PLAIN
elif device_type == AUTOPART_TYPE_BTRFS and \
- (fstype == "swap" or \
+ (fstype in ("swap", "biosboot", "prepboot") or \
(mountpoint and mountpoint.startswith("/boot"))):
device_type = AUTOPART_TYPE_PLAIN
diff --git a/pyanaconda/ui/gui/spokes/lib/accordion.py b/pyanaconda/ui/gui/spokes/lib/accordion.py
index 473ff04db..e24a0313d 100644
--- a/pyanaconda/ui/gui/spokes/lib/accordion.py
+++ b/pyanaconda/ui/gui/spokes/lib/accordion.py
@@ -155,7 +155,8 @@ class Page(Gtk.Box):
if not mountpoint:
# This catches things like swap.
return SYSTEM_DEVICE
- elif mountpoint in ["/", "/boot", "/boot/efi", "/tmp", "/usr", "/var"]:
+ elif mountpoint in ["/", "/boot", "/boot/efi", "/tmp", "/usr", "/var",
+ "biosboot", "prepboot"]:
return SYSTEM_DEVICE
else:
return DATA_DEVICE