mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-26 06:46:13 +01:00
Merge pull request #1043 from dirkmueller/download_url_quoting
Fix quoting of download urls
This commit is contained in:
commit
dec6f7135d
11
osc/build.py
11
osc/build.py
@ -188,12 +188,10 @@ class Buildinfo:
|
||||
self.pathes.append(node.get('project')+"/"+node.get('repository'))
|
||||
# a hash providing the matching URL for specific repos for newer OBS instances
|
||||
if node.get('url'):
|
||||
url = node.get('url').replace('%', '%%')
|
||||
baseurl = node.get('url').replace('%', '%%')
|
||||
if config['api_host_options'][apiurl]['downloadurl']:
|
||||
# Add the path element to the download url override.
|
||||
baseurl = config['api_host_options'][apiurl]['downloadurl'] + urlsplit(node.get('url'))[2]
|
||||
else:
|
||||
baseurl = node.get('url')
|
||||
self.urls[node.get('project')+"/"+node.get('repository')] = baseurl + '/%(arch)s/%(filename)s'
|
||||
|
||||
self.vminstall_list = [ dep.name for dep in self.deps if dep.vminstall ]
|
||||
@ -295,14 +293,9 @@ class Pac:
|
||||
|
||||
|
||||
def makeurls(self, cachedir, urllist):
|
||||
|
||||
self.urllist = []
|
||||
self.localdir = '%s/%s/%s/%s' % (cachedir, self.project, self.repository, self.arch)
|
||||
self.fullfilename = os.path.join(self.localdir, self.canonname)
|
||||
|
||||
# remote URLs
|
||||
for url in urllist:
|
||||
self.urllist.append(url % self.mp)
|
||||
self.urllist = [url % self.mp for url in urllist]
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
Loading…
Reference in New Issue
Block a user