From ab6116821b6dc3b47471e830b4df87c23ca3a41a Mon Sep 17 00:00:00 2001 From: Jeremy Katz Date: Wed, 24 Jul 2002 05:34:53 +0000 Subject: fix cd installs (based on msf's comments). also, add stuff to copy RedHat/base/comps.rpm into /var/tmp before we start installing packages and actually install it after the install. there's got to be a better way, but this will at least work for this beta --- urlinstall.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'urlinstall.py') diff --git a/urlinstall.py b/urlinstall.py index 5851e5014..2957bbe5a 100644 --- a/urlinstall.py +++ b/urlinstall.py @@ -68,6 +68,30 @@ class UrlInstallMethod(InstallMethod): return file + def copyFileToTemp(self, filename): + tmppath = self.getTempPath() + + if self.multiDics: + base = "%s/disc1" % (self.pkgUrl,) + else: + base = self.pkgUrl + fullPath = base + filename + + file = tmppath + os.path.basename(fullPath) + + connected = 0 + while not connected: + try: + urllib.urlretrieve(fullPath, file) + except IOError, (errnum, msg): + log("IOError %s occurred getting %s: %s", + errnum, fullPath, str(msg)) + time.sleep(5) + else: + connected = 1 + + return file + def unlinkFilename(self, fullName): os.remove(fullName) -- cgit