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

[PATCH] Make sure partitioning-related drive lists are sorted properly. (#534065)



---
 storage/__init__.py |    2 +-
 storage/devices.py  |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 310d4b4..482ac9f 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -376,7 +376,7 @@ class Storage(object):
                     log.info("Skipping disk: %s: No media present" % device.name)
                     continue
                 disks.append(device)
-        disks.sort(key=lambda d: d.name)
+        disks.sort(key=lambda d: d.name, cmp=isys.compareDrives)
         return disks
 
     @property
diff --git a/storage/devices.py b/storage/devices.py
index 5a74dfa..a417d76 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -111,6 +111,7 @@ from errors import *
 from iutil import log_method_call, notify_kernel, numeric_type
 from udev import *
 from formats import get_device_format_class, getFormat, DeviceFormat
+from isys import compareDrives
 
 import gettext
 _ = lambda x: gettext.ldgettext("anaconda", x)
@@ -857,6 +858,7 @@ class PartitionDevice(StorageDevice):
         if not exists:
             # this is a request, not a partition -- it has no parents
             self.req_disks = self.parents[:]
+            self.req_disks.sort(key=lambda d: d.name, cmp=compareDrives)
             for dev in self.parents:
                 dev.removeChild()
             self.parents = []
-- 
1.6.0.6


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