[PATCH 2/2] Remove storageComplete, which was only called from dispatch.py.
Chris Lumens
clumens at redhat.com
Fri Oct 26 19:37:45 UTC 2012
---
pyanaconda/storage/__init__.py | 64 ------------------------------------------
1 file changed, 64 deletions(-)
diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index 0726a1c..0b66367 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -110,70 +110,6 @@ def storageInitialize(storage, ksdata, protected):
if d.name not in ksdata.ignoredisk.ignoredisk]
log.debug("onlyuse is now: %s" % (",".join(ksdata.ignoredisk.onlyuse)))
-# dispatch.py helper function
-def storageComplete(anaconda):
- devs = anaconda.storage.devicetree.getDevicesByType("luks/dm-crypt")
- existing_luks = False
- new_luks = False
- for dev in devs:
- if dev.exists:
- existing_luks = True
- else:
- new_luks = True
-
- if (anaconda.storage.encryptedAutoPart or new_luks) and \
- not anaconda.storage.encryptionPassphrase:
- while True:
- (passphrase, retrofit) = anaconda.intf.getLuksPassphrase(preexist=existing_luks)
- if passphrase:
- anaconda.storage.encryptionPassphrase = passphrase
- anaconda.storage.encryptionRetrofit = retrofit
- break
- else:
- rc = anaconda.intf.messageWindow(_("Encrypt device?"),
- _("You specified block device encryption "
- "should be enabled, but you have not "
- "supplied a passphrase. If you do not "
- "go back and provide a passphrase, "
- "block device encryption will be "
- "disabled."),
- type="custom",
- custom_buttons=[_("Back"), _("Continue")],
- default=0)
- if rc == 1:
- log.info("user elected to not encrypt any devices.")
- undoEncryption(anaconda.storage)
- anaconda.storage.encryptedAutoPart = False
- break
-
- if anaconda.storage.encryptionPassphrase:
- for dev in anaconda.storage.devices:
- if dev.format.type == "luks" and not dev.format.exists and \
- not dev.format.hasKey:
- dev.format.passphrase = anaconda.storage.encryptionPassphrase
-
- map(lambda d: anaconda.storage.services.update(d.services),
- anaconda.storage.devices)
-
- if anaconda.ksdata:
- return
-
- rc = anaconda.intf.messageWindow(_("Confirm"),
- _("The partitioning options you have selected "
- "will now be written to disk. Any "
- "data on deleted or reformatted partitions "
- "will be lost."),
- type = "custom", custom_icon="warning",
- custom_buttons=[_("Go _Back"),
- _("_Write Changes to Disk")],
- default = 0)
-
- # Make sure that all is down, even the disks that we setup after popluate.
- anaconda.storage.devicetree.teardownAll()
-
- if rc == 0:
- return DISPATCH_BACK
-
def turnOnFilesystems(storage):
upgrade = "preupgrade" in flags.cmdline
--
1.7.11.2
More information about the anaconda-patches
mailing list