[f20-branch/rhel7-branch][PATCH] Do not allow setting empty LV names (#1017504)

David Lehman dlehman at redhat.com
Thu Oct 17 14:47:22 UTC 2013


On Thu, 2013-10-17 at 15:12 +0200, Vratislav Podzimek wrote:
> If user tries to set empty LV name, the easiest thing we can do to prevent
> issues is to reset it to the old value.

Is this patch applicable? I just pushed it yesterday.

https://lists.fedorahosted.org/pipermail/anaconda-patches/2013-October/006545.html

What it does is generate a default name for devices when the name is set
to "" in the UI, which IMO is a better solution than reverting it to the
previous name.

David

> 
> Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
> ---
>  pyanaconda/ui/gui/spokes/custom.py | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
> index cc757b5..2f36b33 100644
> --- a/pyanaconda/ui/gui/spokes/custom.py
> +++ b/pyanaconda/ui/gui/spokes/custom.py
> @@ -1127,6 +1127,9 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
>          changed_name = False
>          if self._nameEntry.get_sensitive():
>              name = self._nameEntry.get_text()
> +            if name == "":
> +                name = old_name
> +                self._nameEntry.set_text(name)
>              changed_name = (name != old_name)
>          else:
>              # name entry insensitive means we don't control the name




More information about the anaconda-patches mailing list