summaryrefslogtreecommitdiffstats
path: root/urlinstall.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-04-24 15:46:31 +0000
committerJeremy Katz <katzj@redhat.com>2003-04-24 15:46:31 +0000
commit0a562126d84c59a113231ae7ab38984f92d62153 (patch)
tree5e87b9094f4ebdc328979e3a0640dee5f1fc40cb /urlinstall.py
parentdd200d781bd9012f562399c2ee69c23fe60d86b9 (diff)
downloadanaconda-0a562126d84c59a113231ae7ab38984f92d62153.tar.gz
anaconda-0a562126d84c59a113231ae7ab38984f92d62153.tar.xz
anaconda-0a562126d84c59a113231ae7ab38984f92d62153.zip
another taroon merge. tagged before as before-taroon-merge, after as
after-taroon-merge this one adds s390 fixes, basic i/p series platform support, support for multiple kernels and one second stage, cmdline kickstart mode (nice for s390), some warning cleanups.
Diffstat (limited to 'urlinstall.py')
-rw-r--r--urlinstall.py34
1 files changed, 23 insertions, 11 deletions
diff --git a/urlinstall.py b/urlinstall.py
index 1a570ff05..a3d8f4fb8 100644
--- a/urlinstall.py
+++ b/urlinstall.py
@@ -213,17 +213,29 @@ class UrlInstallMethod(InstallMethod):
def __init__(self, url, rootPath):
InstallMethod.__init__(self, rootPath)
- i = string.index(url, '://') + 2
- self.baseUrl = url[0:i]
- rem = url[i:]
- new = string.replace(rem, "//", "/")
- while (new != rem):
- rem = new
- new = string.replace(rem, "//", "/")
- rem = new
- if rem and rem[-1] == "/":
- rem = rem[:-1]
- self.baseUrl = self.baseUrl + rem
+ if url.startswith("ftp"):
+ isFtp = 1
+ else:
+ isFtp = 0
+
+ # build up the url. this is tricky so that we can replace
+ # the first instance of // with /%3F to do absolute URLs right
+ i = string.index(url, '://') + 3
+ self.baseUrl = url[:i]
+ rem = url[i:]
+
+ i = string.index(rem, '/') + 1
+ self.baseUrl = self.baseUrl + rem[:i]
+ rem = rem[i:]
+
+ # encoding fun so that we can handle absolute paths
+ if rem.startswith("/") and isFtp:
+ rem = "%2F" + rem[1:]
+
+ self.baseUrl = self.baseUrl + rem
+
+ if self.baseUrl[-1] == "/":
+ self.baseUrl = self.baseUrl[:-1]
# self.baseUrl points at the path which contains the 'RedHat'
# directory with the hdlist.