[PATCH] Don't try to unmount the CD before we later unmount the CD (#515564).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index a087cbc..ca973f0 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()
 
-- 
1.6.1.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux