From 1a42b9203412cab698fe8cc665918592b7121579 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 31 Jul 2009 15:41:04 +0200 Subject: 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 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/devices.py b/storage/devices.py index 04da8feac..8658e4f31 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) -- cgit