[PATCH] Consider encryption when checking for duplicate mountpoint. (#526697)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 iw/lvm_dialog_gui.py       |    5 ++++-
 iw/partition_dialog_gui.py |    5 ++++-
 iw/raid_dialog_gui.py      |    5 ++++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
index b481c40..a93a646 100644
--- a/iw/lvm_dialog_gui.py
+++ b/iw/lvm_dialog_gui.py
@@ -640,9 +640,12 @@ class VolumeGroupEditor:
                     # we checked this VG's LVs above; now check the rest of
                     # the devices in the tree
                     mountdevs = self.lvs.values()
+                    full_name = "%s-%s" % (self.vg.name, lv['name'])
                     for (mp,d) in self.storage.mountpoints.iteritems():
                         if (d.type != "lvmlv" or d.vg.id != self.vg.id) and \
-                           mp == mountpoint:
+                           mp == mountpoint and \
+                           not (isinstance(d, LUKSDevice) and
+                                full_name in [d.name for d in dev.parents]):
                             used = True
                             break
 
diff --git a/iw/partition_dialog_gui.py b/iw/partition_dialog_gui.py
index 5a9c19d..80affbd 100644
--- a/iw/partition_dialog_gui.py
+++ b/iw/partition_dialog_gui.py
@@ -115,7 +115,10 @@ class PartitionEditor:
             if mountpoint:
                 used = False
                 for (mp, dev) in self.storage.mountpoints.iteritems():
-                    if mp == mountpoint and dev.id != self.origrequest.id:
+                    if mp == mountpoint and \
+                       dev.id != self.origrequest.id and \
+                       not (self.origrequest.format.type == "luks" and
+                            self.origrequest in dev.parents):
                         used = True
                         break
 
diff --git a/iw/raid_dialog_gui.py b/iw/raid_dialog_gui.py
index 0910a97..a256969 100644
--- a/iw/raid_dialog_gui.py
+++ b/iw/raid_dialog_gui.py
@@ -169,7 +169,10 @@ class RaidEditor:
             if mountpoint:
                 used = False
                 for (mp, dev) in self.storage.mountpoints.iteritems():
-                    if mp == mountpoint and dev.id != self.origrequest.id:
+                    if mp == mountpoint and \
+                       dev.id != self.origrequest.id and \
+                       not (self.origrequest.format.type == "luks" and
+                            self.origrequest in dev.parents):
                         used = True
                         break
 
-- 
1.6.2.5

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux