1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-26 22:56:15 +01:00

allow to override apiurl for 'build'

This commit is contained in:
Ludwig Nussel 2010-06-30 13:37:26 +02:00
parent 382dd29e03
commit 14d4ece2fb
2 changed files with 4 additions and 4 deletions

View File

@ -345,7 +345,7 @@ def check_trusted_projects(apiurl, projects):
config['api_host_options'][apiurl]['trusted_prj'] = trusted
conf.config_set_option(apiurl, 'trusted_prj', ' '.join(trusted))
def main(opts, argv):
def main(apiurl, opts, argv):
repo = argv[0]
arch = argv[1]
@ -433,7 +433,6 @@ def main(opts, argv):
pac = '_repository'
else:
pac = store_read_package(os.curdir)
apiurl = store_read_apiurl(os.curdir)
# make it possible to override configuration of the rc file
for var in ['OSC_PACKAGECACHEDIR', 'OSC_SU_WRAPPER', 'OSC_BUILD_ROOT']:

View File

@ -3780,7 +3780,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
f.close()
else:
project = alternative_project or store_read_project('.')
repositories = get_repositories_of_project(store_read_apiurl('.'), project)
apiurl = self.get_api_url()
repositories = get_repositories_of_project(apiurl, project)
if not len(repositories):
raise oscerr.WrongArgs('no repositories defined for project \'%s\'' % project)
try:
@ -3984,7 +3985,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
raise oscerr.WrongOptions('--offline and --preload are mutually exclusive')
print 'Building %s for %s/%s' % (args[2], args[0], args[1])
return osc.build.main(opts, args)
return osc.build.main(self.get_api_url(), opts, args)
@cmdln.option('--local-package', action='store_true',