diff options
author | Erik Troan <ewt@redhat.com> | 2001-06-29 20:15:07 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2001-06-29 20:15:07 +0000 |
commit | 9be120136dcdc264225e30ebd449d83403addd16 (patch) | |
tree | 4fafa186fa8212a7df96986e9e4e9fb8be6220df | |
parent | 487f0fbb19725523b28b87c62df7efd42b47a79c (diff) | |
download | anaconda-9be120136dcdc264225e30ebd449d83403addd16.tar.gz anaconda-9be120136dcdc264225e30ebd449d83403addd16.tar.xz anaconda-9be120136dcdc264225e30ebd449d83403addd16.zip |
support loopback mounted isos
-rw-r--r-- | urlinstall.py | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/urlinstall.py b/urlinstall.py index 3e0ffcc54..2ce6f820e 100644 --- a/urlinstall.py +++ b/urlinstall.py @@ -31,12 +31,12 @@ import httplib import StringIO FILENAME = 1000000 +DISCNUM = 1000002 class UrlInstallMethod(InstallMethod): def readComps(self, hdlist): - return ComponentSet(self.baseUrl + '/RedHat/base/comps', - hdlist) + return ComponentSet(self.baseUrl + '/RedHat/base/comps', hdlist) def getFilename(self, h, timer): root = "/mnt/sysimage" @@ -51,7 +51,12 @@ class UrlInstallMethod(InstallMethod): if type("/") == type(h): fullPath = self.baseUrl + "/" + h else: - fullPath = self.baseUrl + "/RedHat/RPMS/" + h[FILENAME] + if self.multiDiscs: + base = "%s/disc%d" % (self.pkgUrl, h[DISCNUM]) + else: + base = self.pkgUrl + + fullPath = base + "/RedHat/RPMS/" + h[FILENAME] file = tmppath + os.path.basename(fullPath) @@ -121,3 +126,11 @@ class UrlInstallMethod(InstallMethod): if rem and rem[-1] == "/": rem = rem[:-1] self.baseUrl = self.baseUrl + rem + + if self.baseUrl[-6:] == "/disc1": + self.multiDiscs = 1 + self.pkgUrl = self.baseUrl[:-6] + else: + self.multiDiscs = 0 + self.pkgUrl = self.baseUrl + |