mirror of
https://github.com/openSUSE/osc.git
synced 2025-08-21 05:58:52 +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:
11
osc/build.py
11
osc/build.py
@@ -88,6 +88,8 @@ class Buildinfo:
|
|||||||
break
|
break
|
||||||
|
|
||||||
self.buildarch = root.find('arch').text
|
self.buildarch = root.find('arch').text
|
||||||
|
self.downloadurl = root.get('downloadurl')
|
||||||
|
self.apiurl = apisrv
|
||||||
self.debuginfo = 0
|
self.debuginfo = 0
|
||||||
if root.find('debuginfo') != None:
|
if root.find('debuginfo') != None:
|
||||||
try:
|
try:
|
||||||
@@ -383,8 +385,15 @@ def main(opts, argv):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
print 'Updating cache of required packages'
|
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'],
|
fetcher = Fetcher(cachedir = config['packagecachedir'],
|
||||||
urllist = config['urllist'],
|
urllist = urllist,
|
||||||
api_host_options = config['api_host_options'],
|
api_host_options = config['api_host_options'],
|
||||||
http_debug = config['http_debug'])
|
http_debug = config['http_debug'])
|
||||||
|
|
||||||
|
14
osc/conf.py
14
osc/conf.py
@@ -28,8 +28,6 @@ The configuration dictionary could look like this:
|
|||||||
'build-root': '/abuild/oscbuild-%(repo)s-%(arch)s',
|
'build-root': '/abuild/oscbuild-%(repo)s-%(arch)s',
|
||||||
'packagecachedir': '/var/cache/osbuild',
|
'packagecachedir': '/var/cache/osbuild',
|
||||||
'su-wrapper': 'sudo',
|
'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-cmd': '/usr/bin/build',
|
||||||
'build-root': '/var/tmp/build-root',
|
'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',
|
'debug': '0',
|
||||||
'http_debug': '0',
|
'http_debug': '0',
|
||||||
'traceback': '0',
|
'traceback': '0',
|
||||||
@@ -319,10 +309,6 @@ def get_config(override_conffile = None,
|
|||||||
if config['extra-pkgs'] == []:
|
if config['extra-pkgs'] == []:
|
||||||
config['extra-pkgs'] = None
|
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
|
# collect the usernames, passwords and additional options for each api host
|
||||||
api_host_options = { }
|
api_host_options = { }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user