From 799561399117084c9d048adf3f56b6d46491a579 Mon Sep 17 00:00:00 2001 From: Marcus Huewe Date: Fri, 30 Sep 2011 14:53:14 +0200 Subject: [PATCH] - revert 3834263171a86633053552e269385c3aa5602277 - fixed "parse_repoarchdescr": don't ignore repo if the repo name is a supported arch name --- osc/commandline.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index 7b51edfd..9334a42c 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -4701,7 +4701,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. print row - def parse_repoarchdescr(self, args, noinit = False, alternative_project = None, ignore_descr = False, repository = None, architecture = None): + def parse_repoarchdescr(self, args, noinit = False, alternative_project = None, ignore_descr = False): """helper to parse the repo, arch and build description from args""" import osc.build import glob @@ -4711,8 +4711,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. if arg.endswith('.spec') or arg.endswith('.dsc') or arg.endswith('.kiwi'): arg_descr = arg else: - if arg in osc.build.can_also_build.get(osc.build.hostarch, []) or \ - arg in osc.build.hostarch: + if (arg in osc.build.can_also_build.get(osc.build.hostarch, []) + or arg in osc.build.hostarch) and arg_arch is None: arg_arch = arg elif not arg_repository: arg_repository = arg @@ -4723,12 +4723,6 @@ Please submit there instead, or use --nodevelproject to force direct submission. arg_arch = arg_arch or osc.build.hostarch - # take manual specified repository - if repository: - arg_repository = repository - if architecture: - arg_arch = architecture - repositories = [] # store list of repos for potential offline use repolistfile = os.path.join(os.getcwd(), osc.core.store, "_build_repositories") @@ -4936,7 +4930,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. if len(args) > 3: raise oscerr.WrongArgs('Too many arguments') - args = self.parse_repoarchdescr(args, opts.noinit or opts.offline, opts.alternative_project, args[0], args[1]) + args = self.parse_repoarchdescr(args, opts.noinit or opts.offline, opts.alternative_project) # check for source services r = None