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

[PATCH 3/8] When checking logical partition dependcies, make sure the are one the same disk



When checking if a logical partition dependsOn() another device because that
other device is an extended partition also make sure they are on the same disk.
---
 storage/devices.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index 04da8fe..8658e4f 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -1141,7 +1141,8 @@ class PartitionDevice(StorageDevice):
 
     def dependsOn(self, dep):
         """ Return True if this device depends on dep. """
-        if isinstance(dep, PartitionDevice) and dep.isExtended and self.isLogical:
+        if isinstance(dep, PartitionDevice) and dep.isExtended and \
+           self.isLogical and self.disk == dep.disk:
             return True
 
         return Device.dependsOn(self, dep)
-- 
1.6.2.2


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