From d4e7e4628ab8f9bd1421fe0ea8449f0f0f09050e Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Wed, 5 Aug 2009 13:27:37 -0400 Subject: Don't try to unmount the CD before we later unmount the CD (#515564). Doing so can only result in two things: (1) /mnt/source has been removed so teardown will fail, or (2) there's no media to eject the second time. While I'm at it, also fix copying the media.repo file to the right location. --- yuminstall.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'yuminstall.py') diff --git a/yuminstall.py b/yuminstall.py index a087cbc2b..ca973f0c0 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -997,15 +997,10 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon fd.close() 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/anaconda.repos.d/%s-install-media.repo" %(anaconda.rootPath, productName)) + "%s/etc/yum.repos.d/%s-install-media.repo" %(anaconda.rootPath, productName)) except Exception, e: log.debug("Error copying media.repo: %s" %(e,)) @@ -1018,6 +1013,8 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon "%s/var/cache/yum/%s" %(anaconda.rootPath, repo)) except Exception, e: log.debug("Error setting up media repository: %s" %(e,)) + else: + isys.umount(self.ayum.tree) anaconda.backend.removeInstallImage() -- cgit