diff options
author | Chris Lumens <clumens@redhat.com> | 2007-12-14 14:26:28 -0500 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2007-12-14 14:26:28 -0500 |
commit | 43ed5befdb815f307a752a780cbf266c7e43696f (patch) | |
tree | 96f34b875928dd46f4d512600b5069aa41e60287 | |
parent | f87faeea0eae49d86b83308cc34cebdd3709db9d (diff) | |
download | anaconda-43ed5befdb815f307a752a780cbf266c7e43696f.tar.gz anaconda-43ed5befdb815f307a752a780cbf266c7e43696f.tar.xz anaconda-43ed5befdb815f307a752a780cbf266c7e43696f.zip |
Don't copy the stage2 image over for NFS installs.
-rw-r--r-- | installmethod.py | 2 | ||||
-rw-r--r-- | yuminstall.py | 47 |
2 files changed, 26 insertions, 23 deletions
diff --git a/installmethod.py b/installmethod.py index d1cf8bdc8..a6cbfe999 100644 --- a/installmethod.py +++ b/installmethod.py @@ -32,7 +32,7 @@ def doMethodComplete(anaconda): except Exception, e: log.debug("Error copying media.repo: %s" %(e,)) - if anaconda.backend.ayum._loopbackFile: + if anaconda.backend.ayum._loopbackFile and (anaconda.mediaDevice or anaconda.backend.ayum.isodir): try: os.unlink(anaconda.backend.ayum._loopbackFile) except SystemError: diff --git a/yuminstall.py b/yuminstall.py index 55d3242dc..67c850121 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -305,33 +305,36 @@ class AnacondaYum(YumSorter): log.debug("Not copying stage2.img as we can't find it") return - self._loopbackFile = "%s%s/rhinstall-stage2.img" % (chroot, - fsset.filesystemSpace(chroot)[0][0]) + if self.isodir or self.anaconda.mediaDevice: + self._loopbackFile = "%s%s/rhinstall-stage2.img" % (chroot, + fsset.filesystemSpace(chroot)[0][0]) - try: - win = self.anaconda.intf.waitWindow (_("Copying File"), - _("Transferring install image to hard drive...")) - shutil.copyfile("%s/images/stage2.img" % (self.tree,), - self._loopbackFile) - win.pop() - except Exception, e: - if win: + try: + win = self.anaconda.intf.waitWindow (_("Copying File"), + _("Transferring install image to hard drive...")) + shutil.copyfile("%s/images/stage2.img" % (self.tree,), + self._loopbackFile) win.pop() + except Exception, e: + if win: + win.pop() - log.critical("error transferring stage2.img: %s" %(e,)) + log.critical("error transferring stage2.img: %s" %(e,)) - if isinstance(e, IOError) and e.errno == 5: - msg = _("An error occurred transferring the install image " - "to your hard drive. This is probably due to " - "bad media.") - else: - msg = _("An error occurred transferring the install image " - "to your hard drive. You are probably out of disk " - "space.") + if isinstance(e, IOError) and e.errno == 5: + msg = _("An error occurred transferring the install image " + "to your hard drive. This is probably due to " + "bad media.") + else: + msg = _("An error occurred transferring the install image " + "to your hard drive. You are probably out of disk " + "space.") - self.anaconda.intf.messageWindow(_("Error"), msg) - os.unlink(self._loopbackFile) - return 1 + self.anaconda.intf.messageWindow(_("Error"), msg) + os.unlink(self._loopbackFile) + return 1 + else: + self._loopbackFile = "%s/images/stage2.img" % self.tree isys.lochangefd("/dev/loop0", self._loopbackFile) |