[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH] The delete button on a disk only removes partitions. (#496630)
- From: David Lehman <dlehman redhat com>
- To: anaconda-devel-list redhat com
- Cc:
- Subject: [PATCH] The delete button on a disk only removes partitions. (#496630)
- Date: Thu, 23 Apr 2009 17:35:53 -0500
This may not be the way it should be, but it's the way it is.
---
partIntfHelpers.py | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/partIntfHelpers.py b/partIntfHelpers.py
index bd1ddbb..6de6e37 100644
--- a/partIntfHelpers.py
+++ b/partIntfHelpers.py
@@ -151,17 +151,24 @@ def doDeleteDependentDevices(intf, storage, device, confirm=1, quiet=0):
if not rc:
return False
- deps = storage.deviceDeps(device)
- if not deps:
+ partitions = [p for p in storage.partitions if p.disk == device]
+ if not partitions:
# nothing to do
return False
immutable = []
- for dep in deps:
- if storage.deviceImmutable(dep):
+ for dep in partitions:
+ if storage.deviceImmutable(dep) is not False:
immutable.append(dep.path)
continue
else:
+ if dep.format.type == "luks":
+ try:
+ luksdev = storage.devicetree.getChildren(dep)[0]
+ except IndexError:
+ pass
+ else:
+ storage.destroyDevice(luksdev)
storage.destroyDevice(dep)
if immutable and not quiet:
--
1.6.0.6
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]