[PATCH 8/8] Don't let defaults override user-specified container settings. (#879702)
David Lehman
dlehman at redhat.com
Thu Nov 29 17:19:32 UTC 2012
---
pyanaconda/ui/gui/spokes/custom.py | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 9241742..d2f3338 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -1780,6 +1780,16 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self.clear_errors()
with ui_storage_logger():
+ factory = self.__storage.getDeviceFactory(device_type, size)
+ container = self.__storage.getContainer(factory)
+
+ if container:
+ # don't override user-initiated changes to a defined container
+ if factory.encrypt_members:
+ encrypted = container.encrypted
+
+ disks = container.disks
+
try:
self.__storage.newDevice(device_type,
size=size,
@@ -1797,7 +1807,6 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
except StorageError as e:
log.error("newDevice failed: %s" % e)
log.debug("trying to find an existing container to use")
- factory = self.__storage.getDeviceFactory(device_type, size)
container = self.__storage.getContainer(factory, existing=True)
log.debug("found container %s" % container)
if container:
--
1.7.7.6
More information about the anaconda-patches
mailing list