FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Infrastructure

 
 
LinkBack Thread Tools
 
Old 11-11-2009, 07:53 PM
David Lehman
 
Default 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

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 12:53 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org