If any of the ancestors of the chosen device is encrypted (typically an encrypted container like LVM on top of LUKS), we don't want to let user play with the Encrypt checkbox even if the device is not BTRFS.
Related: rhbz#1255679
(port of the commit 05f7de0f4529b0e375419d27b4150d68205e7479 from master)
Signed-off-by: Vratislav Podzimek vpodzime@redhat.com --- pyanaconda/ui/gui/spokes/custom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index 11ab9b0..592247b 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -2306,7 +2306,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): def on_reformat_toggled(self, widget): active = widget.get_active()
- fancy_set_sensitive(self._encryptCheckbox, active) + encrypt_sensitive = active if self._current_selector: device = self._current_selector.device.raw_device
@@ -2315,14 +2315,14 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): 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. - fancy_set_sensitive(self._encryptCheckbox, False) + encrypt_sensitive = False
# you can't encrypt a btrfs subvolume -- only the volume/container device_type = self._get_current_device_type() if device_type == DEVICE_TYPE_BTRFS: self._encryptCheckbox.set_active(False)
- fancy_set_sensitive(self._encryptCheckbox, device_type != DEVICE_TYPE_BTRFS) + fancy_set_sensitive(self._encryptCheckbox, encrypt_sensitive and device_type != DEVICE_TYPE_BTRFS) fancy_set_sensitive(self._fsCombo, active)
def on_fs_type_changed(self, combo):