--- storage/__init__.py | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/storage/__init__.py b/storage/__init__.py index 8678b6e..af24af6 100644 --- a/storage/__init__.py +++ b/storage/__init__.py @@ -327,6 +327,18 @@ class Storage(object): return partitions @property + def lukses(self): + """ A list of the LUKS devices in the device tree. + + This is based on the current state of the device tree and + does not necessarily reflect the actual on-disk state of the + system's disks. + """ + lukses = self.devicetree.getDevicesByType("luks") + lukses.sort(key=lambda d: d.name) + return lukses + + @property def vgs(self): """ A list of the LVM Volume Groups in the device tree. @@ -519,6 +531,13 @@ class Storage(object): else: return _("This device is part of a LVM volume " "group.") + elif device.format.type == "luks": + for luksdev in self.lukses: + #If we are checking LUKS, check also devices which are on top of it + msg = self.deviceImmutable(luksdev) + if msg: + #remove the tailing dot to construct the message + return " ".join(msg[:-1], "on top of LUKS device %s." % (luksdev.name,)) elif isinstance(device, PartitionDevice) and device.isExtended: reasons = {} for dep in self.deviceDeps(device): -- 1.5.4.3 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list