From 055f577c6b640b26fb71f2d9bb6cae703b500e03 Mon Sep 17 00:00:00 2001 From: Marco Strigl Date: Fri, 7 Apr 2017 10:01:20 +0200 Subject: [PATCH] filter excluded repos for package by default --- osc/commandline.py | 4 +++- osc/core.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/osc/commandline.py b/osc/commandline.py index fe83000c..6dce6ef1 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -4995,6 +4995,8 @@ Please submit there instead, or use --nodevelproject to force direct submission. help='generate output in CSV format') @cmdln.option('', '--format', default='%(repository)s|%(arch)s|%(state)s|%(dirty)s|%(code)s|%(details)s', help='format string for csv output') + @cmdln.option('--show-excluded', action='store_true', + help='show repos that are excluded for this package') def do_results(self, subcmd, opts, *args): """${cmd_name}: Shows the build results of a package or project @@ -5044,7 +5046,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. kwargs = {'apiurl': apiurl, 'project': project, 'package': package, 'lastbuild': opts.last_build, 'repository': opts.repo, - 'arch': opts.arch, 'wait': opts.watch} + 'arch': opts.arch, 'wait': opts.watch, 'showexcl': opts.show_excluded} if opts.multibuild_package: opts.no_multibuild = False kwargs['multibuild_packages'] = opts.multibuild_package diff --git a/osc/core.py b/osc/core.py index 44083fa2..2992176d 100644 --- a/osc/core.py +++ b/osc/core.py @@ -5543,9 +5543,12 @@ def get_results(apiurl, project, package, verbose=False, printJoin='', *args, ** r = [] printed = False multibuild_packages = kwargs.pop('multibuild_packages', []) + show_excluded = kwargs.pop('showexcl', False) for results in get_package_results(apiurl, project, package, **kwargs): r = [] for res, is_multi in result_xml_to_dicts(results): + if not show_excluded and res['code'] == 'excluded': + continue if '_oldstate' in res: oldstate = res['_oldstate'] continue