[master 4/4] Remove some vestiges of the old packaging module

dashea installerbot-noreply at redhat.com
Fri Jul 17 19:18:45 UTC 2015


From: David Shea <dshea at redhat.com>

---
 pyanaconda/image.py | 64 ++---------------------------------------------------
 1 file changed, 2 insertions(+), 62 deletions(-)

diff --git a/pyanaconda/image.py b/pyanaconda/image.py
index ed65101..05aac1f 100644
--- a/pyanaconda/image.py
+++ b/pyanaconda/image.py
@@ -19,14 +19,13 @@
 
 from pyanaconda import isys
 import os, os.path, stat, tempfile
-from pyanaconda.constants import ISO_DIR
 from pyanaconda.iutil import open   # pylint: disable=redefined-builtin
 
-from pyanaconda.errors import errorHandler, ERROR_RAISE, InvalidImageSizeError, MediaMountError, MissingImageError
+from pyanaconda.errors import errorHandler, ERROR_RAISE, InvalidImageSizeError, MissingImageError
 
 import blivet.util
 import blivet.arch
-from blivet.errors import FSError, StorageError
+from blivet.errors import FSError
 
 import logging
 log = logging.getLogger("anaconda")
@@ -103,61 +102,6 @@ def findFirstIsoImage(path):
 
     return None
 
-def getMediaId(path):
-    if os.access("%s/.discinfo" % path, os.R_OK):
-        f = open("%s/.discinfo" % path)
-        newStamp = f.readline().strip()
-        f.close()
-
-        return newStamp
-    else:
-        return None
-
-# This mounts the directory containing the iso images on ISO_DIR.
-def mountImageDirectory(method, storage):
-    # No need to mount it again.
-    if os.path.ismount(ISO_DIR):
-        return
-
-    if method.method == "harddrive":
-        if method.biospart:
-            log.warning("biospart support is not implemented")
-            devspec = method.biospart
-        else:
-            devspec = method.partition
-
-        # FIXME: teach DeviceTree.resolveDevice about biospart
-        device = storage.devicetree.resolveDevice(devspec)
-
-        while True:
-            try:
-                device.setup()
-                device.format.setup(mountpoint=ISO_DIR)
-            except StorageError as e:
-                log.error("couldn't mount ISO source directory: %s", e)
-                exn = MediaMountError(str(e), device)
-                if errorHandler.cb(exn) == ERROR_RAISE:
-                    raise exn
-    elif method.method.startswith("nfsiso:"):
-        # XXX what if we mount it on ISO_DIR and then create a symlink
-        #     if there are no isos instead of the remount?
-
-        # mount the specified directory
-        path = method.dir
-        if method.dir.endswith(".iso"):
-            path = os.path.dirname(method.dir)
-
-        url = "%s:%s" % (method.server, path)
-
-        while True:
-            try:
-                blivet.util.mount(url, ISO_DIR, fstype="nfs", options=method.options)
-            except OSError as e:
-                log.error("couldn't mount ISO source directory: %s", e)
-                exn = MediaMountError(str(e), device)
-                if errorHandler.cb(exn) == ERROR_RAISE:
-                    raise exn
-
 def mountImage(isodir, tree):
     while True:
         if os.path.isfile(isodir):
@@ -227,10 +171,6 @@ def opticalInstallMedia(devicetree):
 def potentialHdisoSources(devicetree):
     return filter(lambda d: d.format.exists and d.format.mountable, devicetree.getDevicesByType("partition"))
 
-def umountImage(tree):
-    if os.path.ismount(tree):
-        blivet.util.umount(tree)
-
 def verifyMedia(tree, timestamp=None):
     if os.access("%s/.discinfo" % tree, os.R_OK):
         f = open("%s/.discinfo" % tree)


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/4eefce082a2a3074138ebd098aaada903df4d78a


More information about the anaconda-patches mailing list