The code to decide when to lock the encryption checkbutton was too simple. It was possible to toggle it for existing LVs that had been marked for reformat previously. It was also possible to toggle it for new LVs in existing VGs whose PVs were encrypted. It should be active and insensitive whenever there is encryption on existing devices anywhere in the stack since we cannot change that. --- pyanaconda/ui/gui/spokes/custom.py | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index 21501af..c52789c 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -1512,10 +1512,12 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
encryptCheckbox.set_active(device.encrypted) encryptCheckbox.set_sensitive(reformatCheckbox.get_active()) - if device.encrypted and device.exists: - # For existing devices, the encryption checkbutton should not be - # sensitive if the encryption is below the leaf layer. - encryptCheckbox.set_sensitive(use_dev.format.type == "luks") + ancestors = use_dev.ancestors + ancestors.remove(use_dev) + if any([a.format.type == "luks" and a.format.exists for a in ancestors]): + # The encryption checkbutton should not be sensitive if there is + # existing encryption below the leaf layer. + encryptCheckbox.set_sensitive(False)
## ## Set up the filesystem type combo.