[PATCH 09/12] Handle all logical/extended partitions in unusedDevices.

David Lehman dlehman at redhat.com
Thu Oct 4 22:10:13 UTC 2012


Don't just handle those that are part of a Root.
---
 pyanaconda/storage/__init__.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index 7107cc6..19d76e3 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -490,14 +490,15 @@ class Storage(object):
 
                 used_devices.extend(device.ancestors)
 
-                if getattr(device, "isLogical", False):
-                    extended = device.disk.format.extendedPartition.path
-                    used_devices.append(self.devicetree.getDeviceByPath(extended))
-
         for new in [d for d in self.devicetree.leaves if not d.exists]:
             if new in self.swaps or getattr(new.format, "mountpoint", None):
                 used_devices.extend(new.ancestors)
 
+        for device in self.partitions:
+            if getattr(device, "isLogical", False):
+                extended = device.disk.format.extendedPartition.path
+                used_devices.append(self.devicetree.getDeviceByPath(extended))
+
         used = set(used_devices)
         _all = set(self.devices)
         return list(_all.difference(used))
-- 
1.7.7.6



More information about the anaconda-patches mailing list