From 14d4ece2fb8cb261df6babb49ff9f6a4e6bd3bcf Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Wed, 30 Jun 2010 13:37:26 +0200 Subject: [PATCH] allow to override apiurl for 'build' --- osc/build.py | 3 +-- osc/commandline.py | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/osc/build.py b/osc/build.py index 2aaf45d..826f07c 100644 --- a/osc/build.py +++ b/osc/build.py @@ -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']: diff --git a/osc/commandline.py b/osc/commandline.py index a586004..24992c7 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -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', -- 2.1.4