[PATCH 01/19] Don't short-circuit devicetree populate based on clearpart setting.
David Lehman
dlehman at redhat.com
Thu Oct 18 21:49:29 UTC 2012
We don't prompt for passphrases for encrypted devices, so this can
only improve the quality of our device clearing.
---
pyanaconda/storage/__init__.py | 6 ++----
pyanaconda/storage/devicetree.py | 13 +++----------
2 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
index 680bc27..7fbc1bd 100644
--- a/pyanaconda/storage/__init__.py
+++ b/pyanaconda/storage/__init__.py
@@ -348,8 +348,7 @@ class Storage(object):
passphrase=self.encryptionPassphrase,
luksDict=self.__luksDevs,
iscsi=self.iscsi,
- dasd=self.dasd,
- shouldClear=self.shouldClear)
+ dasd=self.dasd)
self.fsset = FSSet(self.devicetree)
self.roots = {}
self.services = set()
@@ -459,8 +458,7 @@ class Storage(object):
passphrase=self.encryptionPassphrase,
luksDict=self.__luksDevs,
iscsi=self.iscsi,
- dasd=self.dasd,
- shouldClear=self.shouldClear)
+ dasd=self.dasd)
self.devicetree.populate(cleanupOnly=cleanupOnly)
self.config.clearPartType = clearPartType # set it back
self.fsset = FSSet(self.devicetree)
diff --git a/pyanaconda/storage/devicetree.py b/pyanaconda/storage/devicetree.py
index 2d30ae4..13ce493 100644
--- a/pyanaconda/storage/devicetree.py
+++ b/pyanaconda/storage/devicetree.py
@@ -155,11 +155,11 @@ class DeviceTree(object):
"""
def __init__(self, conf=None, passphrase=None, luksDict=None,
- iscsi=None, dasd=None, shouldClear=None):
- self.reset(conf, passphrase, luksDict, iscsi, dasd, shouldClear)
+ iscsi=None, dasd=None):
+ self.reset(conf, passphrase, luksDict, iscsi, dasd)
def reset(self, conf=None, passphrase=None, luksDict=None,
- iscsi=None, dasd=None, shouldClear=None):
+ iscsi=None, dasd=None):
# internal data members
self._devices = []
self._actions = []
@@ -173,7 +173,6 @@ class DeviceTree(object):
self.populated = False
self.exclusiveDisks = getattr(conf, "exclusiveDisks", [])
- self.shouldClear = shouldClear or (lambda d: False)
self.iscsi = iscsi
self.dasd = dasd
self.mpathFriendlyNames = getattr(conf, "mpathFriendlyNames", True)
@@ -1647,12 +1646,6 @@ class DeviceTree(object):
device.format = formats.DeviceFormat()
return
- if self.shouldClear(device):
- # if this is a device that will be cleared by clearpart,
- # don't bother with format-specific processing
- log.debug("skipping further processing due to clearpart")
- return
-
#
# now do any special handling required for the device's format
#
--
1.7.7.6
More information about the anaconda-patches
mailing list