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

Anne Mulhern amulhern at redhat.com
Wed May 6 17:59:54 UTC 2015





----- Original Message -----
> From: "Robert Marshall" <rmarshall at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Wednesday, May 6, 2015 11:43:13 AM
> Subject: [RHEL 7.2 | PATCH] Disable Label Entry for PPC PReP Boot Filesystem	(#1172773)
> 
> 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. This fix will
> also do the same for any other filesystem format that does not
> support labels.
> 
> 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..0644cc6 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)
> +
> +        # Only Allow Labels on Filesystems Supporting It
> +        if device.format.labeling():
> +            fancy_set_sensitive(self._labelEntry, True)
> +        else:
> +            fancy_set_sensitive(self._labelEntry, False)

This looks right to me, though I'ld probably shorten it to:

fancy_set_sensitive(self._labelEntry, device.format.labeling())

>  
>          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)
>  
> +        # Only Allow Labels on Filesystems Supporting It
> +        if fmt.labeling():
> +            fancy_set_sensitive(self._labelEntry, True)
> +        else:
> +            fancy_set_sensitive(self._labelEntry, False)
> +            self._labelEntry.set_text("")
> +

I believe that this is correct for RHEL7.

But this becomes trickier in master, because there is one format that can label and
where a label is assigned to that format object when it is created if no label is specified.
So, the question is, should that label be displayed in the _labelEntry field?

see: https://github.com/rhinstaller/anaconda/pull/33 for the _long_ discussion.

Assuming this patch is also for master, those considerations will probably complicate this
bottom chunk a bit on master.

>      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
> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

So, ACK on this patch, but for RHEL7 only.

- mulhern


More information about the anaconda-patches mailing list