[RHEL 7.2 - PATCH] Disable Label Entry for PPC PReP Boot Filesystem (#1172773)

Robert Marshall rmarshall at redhat.com
Fri May 1 15:24:23 UTC 2015


The manual partitioning window in the installer allowed users to
type in and attempt to set a label on PPC PReP Boot filesystems. This
would cause the installer to register an error and go back to the
previous settings. Updated the behavior to automatically clear the
label if the PPC PReP Boot filesystem type is chosen and disabled
the label entry field to prevent users from being able to enter
information that is invalid for this filesystem type.

Resolves rhbz#1172773
---
 pyanaconda/ui/gui/spokes/custom.py | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 77f3414..7be0453 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -1389,7 +1389,12 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
             self._labelEntry.set_text(device.format.label)
         else:
             self._labelEntry.set_text("")
-        fancy_set_sensitive(self._labelEntry, True)
+
+        # Prep Boot Cannot Have Labels Set - so Don't Even Allow It
+        if device.format.type == "prepboot":
+            fancy_set_sensitive(self._labelEntry, False)
+        else:
+            fancy_set_sensitive(self._labelEntry, True)
 
         self._device_size_text = device.size.humanReadable(max_places=2)
         self._sizeEntry.set_text(self._device_size_text)
@@ -2308,6 +2313,13 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
         fmt = getFormat(new_type)
         fancy_set_sensitive(self._mountPointEntry, fmt.mountable)
 
+        # Prep Boot Cannot Have Labels Set - so Don't Even Allow It
+        if fmt.type == "prepboot":
+            fancy_set_sensitive(self._labelEntry, False)
+            self._labelEntry.set_text("")
+        else:
+            fancy_set_sensitive(self._labelEntry, True)
+
     def _populate_container(self, device=None):
         """ Set up the vg widgets for lvm or hide them for other types. """
         device_type = self._get_current_device_type()
-- 
1.8.3.1



More information about the anaconda-patches mailing list