summaryrefslogtreecommitdiffstats
path: root/urlinstall.py
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2001-02-10 00:44:59 +0000
committerErik Troan <ewt@redhat.com>2001-02-10 00:44:59 +0000
commit5cfc4859f52f9aec1a94919f251bf6032e3be534 (patch)
tree2abc3b38f8c8f9cfcfd0ba62a10d2d1c534ade44 /urlinstall.py
parenta2d421d00db7b203e6a4ce79475c3ae51a772684 (diff)
downloadanaconda-5cfc4859f52f9aec1a94919f251bf6032e3be534.tar.gz
anaconda-5cfc4859f52f9aec1a94919f251bf6032e3be534.tar.xz
anaconda-5cfc4859f52f9aec1a94919f251bf6032e3be534.zip
use two part header lists
Diffstat (limited to 'urlinstall.py')
-rw-r--r--urlinstall.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/urlinstall.py b/urlinstall.py
index a417ea628..a38d88d92 100644
--- a/urlinstall.py
+++ b/urlinstall.py
@@ -35,16 +35,21 @@ class UrlInstallMethod(InstallMethod):
tmppath = root + p
break
- file = tmppath + h[FILENAME]
+ # h doubles as a filename -- gross
+ if type("/") == type(h):
+ fullPath = self.baseUrl + "/" + h
+ else:
+ fullPath = self.baseUrl + "/RedHat/RPMS/" + h[FILENAME],
+
+ file = tmppath + os.path.basename(fullPath)
connected = 0
while not connected:
try:
- urllib.urlretrieve(self.baseUrl + "/RedHat/RPMS/" + h[FILENAME],
- file)
+ urllib.urlretrieve(fullPath, file)
except IOError, (errnum, msg):
log("IOError %s occured getting %s: %s",
- errnum, self.baseUrl + "/RedHat/RPMS/" + h[FILENAME], str(msg))
+ errnum, fullPath, str(msg))
time.sleep(5)
else:
connected = 1
@@ -55,7 +60,6 @@ class UrlInstallMethod(InstallMethod):
os.remove(fullName)
def readHeaders(self):
-
connected = 0
while not connected:
try:
@@ -86,6 +90,11 @@ class UrlInstallMethod(InstallMethod):
return HeaderList(hl)
+ def mergeFullHeaders(self, hdlist):
+ fn = self.getFilename("RedHat/base/hdlist2", None)
+ hdlist.mergeFullHeaders(fn)
+ os.unlink(fn)
+
def __init__(self, url):
InstallMethod.__init__(self)