[PATCH 4/4] Don't waste time looking for devices dependent on leaf devices.

David Lehman dlehman at redhat.com
Tue Jul 30 16:47:28 UTC 2013


Also remove hack to include logical partitions as deps of extended
partitions from before they had a proper dependsOn relation.

Related: rhbz#890171
---
 blivet/devicetree.py | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 21227a4..007f533 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -426,15 +426,9 @@ class DeviceTree(object):
         """
         dependents = []
 
-        # special handling for extended partitions since the logical
-        # partitions and their deps effectively depend on the extended
-        logicals = []
-        if isinstance(dep, PartitionDevice) and dep.partType and \
-           dep.isExtended:
-            # collect all of the logicals on the same disk
-            for part in self.getDevicesByInstance(PartitionDevice):
-                if part.partType and part.isLogical and part.disk == dep.disk:
-                    logicals.append(part)
+        # don't bother looping looking for dependents if this is a leaf device
+        if dep.isleaf:
+            return dependents
 
         incomplete = [d for d in self._devices
                             if not getattr(d, "complete", True)]
-- 
1.8.1.4



More information about the anaconda-patches mailing list