summaryrefslogtreecommitdiffstats
path: root/iw/partition_dialog_gui.py
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2010-05-13 19:46:01 -0500
committerDavid Lehman <dlehman@redhat.com>2010-05-19 11:08:35 -0500
commit37b24f72817a2e1ab30bd578f6f8e5b317b5ee0d (patch)
tree054e7d29444d80fe2ee545172622b2286b782ebd /iw/partition_dialog_gui.py
parenta727ecda32fb01ee4be55f037aea3f340f7e1882 (diff)
downloadanaconda-37b24f72817a2e1ab30bd578f6f8e5b317b5ee0d.tar.gz
anaconda-37b24f72817a2e1ab30bd578f6f8e5b317b5ee0d.tar.xz
anaconda-37b24f72817a2e1ab30bd578f6f8e5b317b5ee0d.zip
Don't drop encryption when re-editing new encrypted partitions. (#582888)
Diffstat (limited to 'iw/partition_dialog_gui.py')
-rw-r--r--iw/partition_dialog_gui.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/iw/partition_dialog_gui.py b/iw/partition_dialog_gui.py
index 9279636ea..8f3d320cb 100644
--- a/iw/partition_dialog_gui.py
+++ b/iw/partition_dialog_gui.py
@@ -193,6 +193,8 @@ class PartitionEditor:
request = self.origrequest
request.weight = weight
+ usedev = request
+
if self.lukscb and self.lukscb.get_active() and \
request.format.type != "luks":
luksformat = format
@@ -214,6 +216,14 @@ class PartitionEditor:
luksdev = None
actions.append(ActionDestroyFormat(request))
+ elif self.lukscb and self.lukscb.get_active() and \
+ self.origrequest.format.type == "luks":
+ # re-edit of new encrypted partition. we're only updating
+ # the formatting on the LUKS device
+ try:
+ usedev = self.storage.devicetree.getChildren(self.origrequest)[0]
+ except IndexError:
+ pass
if self.isNew:
# we're all set, so create the actions
@@ -226,7 +236,7 @@ class PartitionEditor:
request.req_primary = primary
request.req_disks = disks
- actions.append(ActionCreateFormat(request, format))
+ actions.append(ActionCreateFormat(usedev, format))
if luksdev:
actions.append(ActionCreateDevice(luksdev))
actions.append(ActionCreateFormat(luksdev))