[anaconda-f20/master] Don't encrypt device if container is encrypted

Vratislav Podzimek vpodzime at redhat.com
Wed Dec 11 07:34:31 UTC 2013


On Tue, 2013-12-10 at 14:07 -0800, Brian C. Lane wrote:
> From: "Brian C. Lane" <bcl at redhat.com>
> 
> This resulted in it creating more luks containers on top of the lvm.
> Also disable the device's encrypt checkbox when a container is already
> encrypted, preventing the user from manually ending up with more luks
> containers.
> 
> Related: rhbz#1038969
> ---
>  pyanaconda/ui/gui/spokes/custom.py | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
> index ac6cab6..d392b32 100644
> --- a/pyanaconda/ui/gui/spokes/custom.py
> +++ b/pyanaconda/ui/gui/spokes/custom.py
> @@ -1738,7 +1738,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
>          self._encryptCheckbox.set_sensitive(self._reformatCheckbox.get_active())
>          ancestors = use_dev.ancestors
>          ancestors.remove(use_dev)
> -        if any(a.format.type == "luks" and a.format.exists for a in ancestors):
> +        if any(a.format.type == "luks" for a in ancestors):
>              # The encryption checkbutton should not be sensitive if there is
>              # existing encryption below the leaf layer.
>              self._encryptCheckbox.set_sensitive(False)
> @@ -2036,6 +2036,10 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
>                            "container_size": getattr(container, "size_policy",
>                                                                 container.size)}
>  
> +                # The container is already encrypted
> +                if container.encrypted and encrypted:
> +                    encrypted = False
I believe you can drop 'and encrypted' from the condition. Otherwise
ACK.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list