1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-04 14:43:38 +02:00

remove hardcoded download server and use download server as reported by

the rep server.
This is fixing all non-opensuse.org build service instances.
This commit is contained in:
2009-02-20 09:36:20 +00:00
parent 5a66ec6fe3
commit c6f70d7506
2 changed files with 10 additions and 15 deletions

View File

@@ -88,6 +88,8 @@ class Buildinfo:
break
self.buildarch = root.find('arch').text
self.downloadurl = root.get('downloadurl')
self.apiurl = apisrv
self.debuginfo = 0
if root.find('debuginfo') != None:
try:
@@ -383,8 +385,15 @@ def main(opts, argv):
continue
print 'Updating cache of required packages'
urllist = []
# OBS 1.5 and before has no downloadurl defined in buildinfo
if bi.downloadurl:
urllist.append( bi.downloadurl + '/%(project)s/%(repository)s/%(arch)s/%(filename)s' )
urllist.append( '%(scheme)s://%(apisrv)s/build/%(project)s/%(repository)s/%(buildarch)s/%(repopackage)s/%(name)s' )
fetcher = Fetcher(cachedir = config['packagecachedir'],
urllist = config['urllist'],
urllist = urllist,
api_host_options = config['api_host_options'],
http_debug = config['http_debug'])

View File

@@ -28,8 +28,6 @@ The configuration dictionary could look like this:
'build-root': '/abuild/oscbuild-%(repo)s-%(arch)s',
'packagecachedir': '/var/cache/osbuild',
'su-wrapper': 'sudo',
'urllist': ['http://download.opensuse.org/repositories/%(project)s/%(repository)s/%(arch)s/%(filename)s',
'http://api.opensuse.org/rpm/%(project)s/%(repository)s/%(repopackage)s/%(buildarch)s/%(name)s'],
}
"""
@@ -50,14 +48,6 @@ DEFAULTS = { 'apisrv': 'https://api.opensuse.org/',
'build-cmd': '/usr/bin/build',
'build-root': '/var/tmp/build-root',
# default list of download URLs, which will be tried in order
'urllist': [
# the normal repo server, redirecting to mirrors
'http://download.opensuse.org/repositories/%(project)s/%(repository)s/%(arch)s/%(filename)s',
# direct access to "full" tree
'%(scheme)s://%(apisrv)s/build/%(project)s/%(repository)s/%(buildarch)s/%(repopackage)s/%(name)s',
],
'debug': '0',
'http_debug': '0',
'traceback': '0',
@@ -319,10 +309,6 @@ def get_config(override_conffile = None,
if config['extra-pkgs'] == []:
config['extra-pkgs'] = None
# transform 'url1, url2, url3' form into a list
if type(config['urllist']) == str:
config['urllist'] = [ i.strip() for i in re_clist.split(config['urllist'].strip()) ]
# collect the usernames, passwords and additional options for each api host
api_host_options = { }