[PATCH 3/6][blivet] Move storageInitialize into anaconda.

David Lehman dlehman at redhat.com
Wed Nov 5 15:49:16 UTC 2014


---
 blivet/__init__.py | 33 +--------------------------------
 blivet/errors.py   |  4 ----
 2 files changed, 1 insertion(+), 36 deletions(-)

diff --git a/blivet/__init__.py b/blivet/__init__.py
index d073039..c83670c 100644
--- a/blivet/__init__.py
+++ b/blivet/__init__.py
@@ -70,7 +70,7 @@ import parted
 from pykickstart.constants import AUTOPART_TYPE_LVM, CLEARPART_TYPE_ALL, CLEARPART_TYPE_LINUX, CLEARPART_TYPE_LIST, CLEARPART_TYPE_NONE
 
 from .storage_log import log_exception_info, log_method_call
-from .errors import DeviceError, DirtyFSError, FSResizeError, FSTabTypeMismatchError, UnknownSourceDeviceError, StorageError, UnrecognizedFSTabEntryError
+from .errors import DeviceError, DirtyFSError, FSResizeError, FSTabTypeMismatchError, StorageError, UnrecognizedFSTabEntryError
 from .devices import BTRFSDevice, BTRFSSubVolumeDevice, BTRFSVolumeDevice, DirectoryDevice, FileDevice, LVMLogicalVolumeDevice, LVMThinLogicalVolumeDevice, LVMThinPoolDevice, LVMVolumeGroupDevice, MDRaidArrayDevice, NetworkStorageDevice, NFSDevice, NoDevice, OpticalDevice, PartitionDevice, TmpFSDevice, devicePathToName
 from .devicetree import DeviceTree
 from .deviceaction import ActionCreateDevice, ActionCreateFormat, ActionDestroyDevice, ActionDestroyFormat, ActionResizeDevice, ActionResizeFormat
@@ -162,37 +162,6 @@ def setSysroot(storageRoot, sysroot=None):
     if sysroot is not None:
         _sysroot = sysroot
 
-def storageInitialize(storage, ksdata, protected):
-    """ Perform installer-specific storage initialization. """
-    from pyanaconda.flags import flags as anaconda_flags
-    flags.update_from_anaconda_flags(anaconda_flags)
-
-    # Platform class setup depends on flags, re-initialize it.
-    _platform.update_from_flags()
-
-    storage.shutdown()
-
-    # Before we set up the storage system, we need to know which disks to
-    # ignore, etc.  Luckily that's all in the kickstart data.
-    storage.config.update(ksdata)
-
-    # Set up the protected partitions list now.
-    if protected:
-        storage.config.protectedDevSpecs.extend(protected)
-
-    storage.reset()
-
-    if protected and not flags.live_install and \
-       not any(d.protected for d in storage.devices):
-        raise UnknownSourceDeviceError(protected)
-
-    # kickstart uses all the disks
-    if flags.automated_install:
-        if not ksdata.ignoredisk.onlyuse:
-            ksdata.ignoredisk.onlyuse = [d.name for d in storage.disks \
-                                         if d.name not in ksdata.ignoredisk.ignoredisk]
-            log.debug("onlyuse is now: %s", ",".join(ksdata.ignoredisk.onlyuse))
-
 def turnOnFilesystems(storage, mountOnly=False, callbacks=None):
     """
     Perform installer-specific activation of storage configuration.
diff --git a/blivet/errors.py b/blivet/errors.py
index 508e3ef..a359b67 100644
--- a/blivet/errors.py
+++ b/blivet/errors.py
@@ -183,10 +183,6 @@ class DasdFormatError(StorageError):
 class SizePlacesError(StorageError):
     pass
 
-# probing
-class UnknownSourceDeviceError(StorageError):
-    pass
-
 # factories
 class DeviceFactoryError(StorageError):
     pass
-- 
1.9.3



More information about the anaconda-patches mailing list