summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-08-05 13:27:37 -0400
committerChris Lumens <clumens@redhat.com>2009-08-05 17:35:18 -0400
commitd4e7e4628ab8f9bd1421fe0ea8449f0f0f09050e (patch)
tree9e026735bb0da54c924699139ecea18457f58b11
parentd09f40b03a1da5ab530c4857d9cb21545e155852 (diff)
downloadanaconda-d4e7e4628ab8f9bd1421fe0ea8449f0f0f09050e.tar.gz
anaconda-d4e7e4628ab8f9bd1421fe0ea8449f0f0f09050e.tar.xz
anaconda-d4e7e4628ab8f9bd1421fe0ea8449f0f0f09050e.zip
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.
-rw-r--r--yuminstall.py9
1 files changed, 3 insertions, 6 deletions
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()