diff options
author | Jeremy Katz <katzj@redhat.com> | 2002-07-12 03:02:29 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2002-07-12 03:02:29 +0000 |
commit | 972088ca2cc18171942319799cf5b8e25d8706c6 (patch) | |
tree | e71f11bed35afdf7e672c4c702259f59db4ffb5a | |
parent | 0d831c1e757d8171e3f6fd39402664a3cc0e70ee (diff) | |
download | anaconda-972088ca2cc18171942319799cf5b8e25d8706c6.tar.gz anaconda-972088ca2cc18171942319799cf5b8e25d8706c6.tar.xz anaconda-972088ca2cc18171942319799cf5b8e25d8706c6.zip |
copy packages from the cdrom to the tmppath before actually using them to install
-rw-r--r-- | image.py | 20 |
1 files changed, 19 insertions, 1 deletions
@@ -19,6 +19,7 @@ import isys import time import kudzu import string +import shutil from constants import * from rhpl.log import log @@ -164,7 +165,24 @@ class CdromInstallMethod(ImageInstallMethod): timer.start() - return self.tree + "/RedHat/RPMS/" + h[1000000] + tmppath = self.getTempPath() + copied = 0 + # FIXME: should retry a few times then prompt for new cd + while not copied: + try: + shutil.copy(self.tree + "/RedHat/RPMS/" + h[1000000], + tmppath + h[1000000]) + except IOError, (errnum, msg): + log("IOError %s occurred copying %s: %s", + errnum, h[1000000], str(msg)) + time.sleep(5) + else: + copied = 1 + + return tmppath + h[1000000] + + def unlinkFilename(self, fullName): + os.remove(fullName) def filesDone(self): if not self.loopbackFile: return |