Make sure the install.img exists before attempting to copy (#578391).
From: Chris Lumens <clumens@redhat.com>
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 a9b0d52..32ea49c 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -889,9 +889,10 @@ class AnacondaYum(YumSorter):
mkeys.sort(mediasort)
stage2img = "%s/images/install.img" % self.tree
- if self.anaconda.backend.mountInstallImage(self.anaco nda, stage2img):
- self.anaconda.storage.umountFilesystems()
- return DISPATCH_BACK
+ if os.path.exists(stage2img):
+ if self.anaconda.backend.mountInstallImage(self.anaco nda, stage2img):
+ self.anaconda.storage.umountFilesystems()
+ return DISPATCH_BACK
for i in mkeys:
self.tsInfo.curmedia = i
--
1.7.0.1
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list