summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2009-04-02 19:48:11 -0500
committerDavid Lehman <dlehman@redhat.com>2009-04-02 22:09:04 -0500
commit8277eede759caff1438987ec4adaedc9a5638e02 (patch)
treeafb05a185a3095adf917e7515687a9d6d424b8b4
parent4418815bb45a518f683a9b12869412510b3e1b0c (diff)
downloadanaconda-8277eede759caff1438987ec4adaedc9a5638e02.tar.gz
anaconda-8277eede759caff1438987ec4adaedc9a5638e02.tar.xz
anaconda-8277eede759caff1438987ec4adaedc9a5638e02.zip
Don't let device names affect action order in general case.
Some complex action sets were being sorted incorrectly because of the name comparisons. Names should only matter if both devices are partitions on the same disk.
-rw-r--r--storage/devicetree.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/storage/devicetree.py b/storage/devicetree.py
index 603aa7422..efd7705b7 100644
--- a/storage/devicetree.py
+++ b/storage/devicetree.py
@@ -530,7 +530,7 @@ class DeviceTree(object):
not isinstance(a1.device, DiskDevice):
ret = -1
else:
- ret = cmp(a2.device.name, a1.device.name)
+ ret = 0
elif a1.isDestroy():
ret = -1
elif a2.isDestroy():
@@ -579,7 +579,7 @@ class DeviceTree(object):
else:
ret = -1
else:
- ret = cmp(a1.device.name, a2.device.name)
+ ret = 0
elif a1.isResize():
ret = -1
elif a2.isResize():
@@ -593,7 +593,7 @@ class DeviceTree(object):
elif a2.isFormat():
ret = -1
else:
- ret = cmp(a1.device.name, a2.device.name)
+ ret = 0
elif a1.device.dependsOn(a2.device):
ret = 1
elif a2.device.dependsOn(a1.device):
@@ -609,7 +609,7 @@ class DeviceTree(object):
not isinstance(a1.device, DiskDevice):
ret = 1
else:
- ret = cmp(a1.device.name, a2.device.name)
+ ret = 0
elif a1.isCreate():
ret = -1
elif a2.isCreate():
@@ -627,7 +627,7 @@ class DeviceTree(object):
else:
ret = cmp(a1.device.name, a2.device.name)
else:
- ret = cmp(a1.device.name, a2.device.name)
+ ret = 0
log.debug("cmp: %d -- %s | %s" % (ret, a1, a2))
return ret