[PATCH 2/3] Remove devices in reverse order in Blivet.recursiveRemove. (#949912)
David Lehman
dlehman at redhat.com
Tue Apr 9 17:57:17 UTC 2013
This is just to make things look nicer when multiple logical partitions
are being removed.
---
blivet/__init__.py | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/blivet/__init__.py b/blivet/__init__.py
index d474f0e..b28ff31 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -718,10 +718,14 @@ class Blivet(object):
def recursiveRemove(self, device):
log.debug("removing %s" % device.name)
-
- # XXX is there any argument for not removing incomplete devices?
- # -- maybe some RAID devices
devices = self.deviceDeps(device)
+
+ # this isn't strictly necessary, but it makes the action list easier to
+ # read when removing logical partitions because of the automatic
+ # renumbering that happens if you remove them in ascending numerical
+ # order
+ devices.reverse()
+
while devices:
log.debug("devices to remove: %s" % ([d.name for d in devices],))
leaves = [d for d in devices if d.isleaf]
--
1.8.1.4
More information about the anaconda-patches
mailing list