diff options
-rw-r--r-- | backend.py | 3 | ||||
-rw-r--r-- | installmethod.py | 18 | ||||
-rw-r--r-- | yuminstall.py | 19 |
3 files changed, 23 insertions, 17 deletions
diff --git a/backend.py b/backend.py index 3d72dc30e..80c79f0f4 100644 --- a/backend.py +++ b/backend.py @@ -185,6 +185,9 @@ class AnacondaBackend: log.warning("getRequiredMedia not implmented for backend!") pass + def complete(self, anaconda): + pass + def doRepoSetup(anaconda): anaconda.backend.doInitialSetup(anaconda) if anaconda.backend.doRepoSetup(anaconda) == DISPATCH_BACK: diff --git a/installmethod.py b/installmethod.py index 3d6d2f8af..77f4a39e3 100644 --- a/installmethod.py +++ b/installmethod.py @@ -27,23 +27,7 @@ log = logging.getLogger("anaconda") import isys, product def doMethodComplete(anaconda): - try: - isys.umount(anaconda.backend.ayum.tree) - except Exception: - pass - - if anaconda.mediaDevice: - try: - shutil.copyfile("%s/media.repo" % anaconda.backend.ayum.tree, - "%s/etc/yum.repos.d/%s-install-media.repo" %(anaconda.rootPath, productName)) - except Exception, e: - log.debug("Error copying media.repo: %s" %(e,)) - - if anaconda.backend.ayum._loopbackFile and (anaconda.mediaDevice or anaconda.backend.ayum.isodir): - try: - os.unlink(anaconda.backend.ayum._loopbackFile) - except SystemError: - pass + anaconda.backend.complete(anaconda) if not anaconda.isKickstart and anaconda.mediaDevice: isys.ejectCdrom(anaconda.mediaDevice) diff --git a/yuminstall.py b/yuminstall.py index 8e2d7bdbf..6af8b6513 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -743,6 +743,25 @@ class YumBackend(AnacondaBackend): AnacondaBackend.__init__(self, anaconda) self.supportsPackageSelection = True + def complete(self, anaconda): + try: + isys.umount(self.ayum.tree) + except Exception: + pass + + if anaconda.mediaDevice: + try: + shutil.copyfile("%s/media.repo" % self.ayum.tree, + "%s/etc/yum.repos.d/%s-install-media.repo" %(anaconda.rootPath, productName)) + except Exception, e: + log.debug("Error copying media.repo: %s" %(e,)) + + if self.ayum._loopbackFile and (anaconda.mediaDevice or self.isodir): + try: + os.unlink(self.ayum._loopbackFile) + except SystemError: + pass + def doInitialSetup(self, anaconda): if anaconda.id.getUpgrade(): # FIXME: make sure that the rpmdb doesn't have stale locks :/ |