[PATCH] Make sure the install.img exists before attempting to copy (#578391).

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

 



While we're able to handle the exception that results without problem (except
for a scary log message), we still set self._loopbackFile in mountInstallImage
so when that method fails, umountFilesystems will attempt to unmount the
install.img that was never copied.  And then that results in an unhandled
exception.
---
 yuminstall.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index de7e974..00bb522 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -900,9 +900,10 @@ class AnacondaYum(YumSorter):
         mkeys.sort(mediasort)
 
         stage2img = "%s/images/install.img" % self.tree
-        if self.anaconda.backend.mountInstallImage(self.anaconda, stage2img):
-            self.anaconda.storage.umountFilesystems()
-            return DISPATCH_BACK
+        if os.path.exists(stage2img):
+            if self.anaconda.backend.mountInstallImage(self.anaconda, stage2img):
+                self.anaconda.storage.umountFilesystems()
+                return DISPATCH_BACK
 
         for i in mkeys:
             self.tsInfo.curmedia = i
-- 
1.6.5.1

_______________________________________________
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