mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-04 02:26:16 +01:00
another try for prjresutls, do not show "excluded" packages/repos by default,
but show the manual disabled ones.
This commit is contained in:
parent
336530b660
commit
5bd78d44f8
@ -3335,8 +3335,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
help='show results only for specified repo(s)')
|
||||
@cmdln.option('-V', '--vertical', action='store_true',
|
||||
help='list packages vertically instead horizontally')
|
||||
@cmdln.option('--hide-disabled', action='store_true',
|
||||
help='hide packages that are disabled or excluded in all repos, also hide repos that have only disabled or excluded packages')
|
||||
@cmdln.option('--show-excluded', action='store_true',
|
||||
help='show packages that are excluded in all repos, also hide repos that have only excluded packages')
|
||||
@cmdln.alias('pr')
|
||||
def do_prjresults(self, subcmd, opts, *args):
|
||||
"""${cmd_name}: Shows project-wide build results
|
||||
@ -3358,7 +3358,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
wd = os.curdir
|
||||
project = store_read_project(wd)
|
||||
|
||||
print '\n'.join(get_prj_results(apiurl, project, hide_legend=opts.hide_legend, csv=opts.csv, status_filter=opts.status_filter, name_filter=opts.name_filter, repo=opts.repo, arch=opts.arch, vertical=opts.vertical, hide_disabled=opts.hide_disabled))
|
||||
print '\n'.join(get_prj_results(apiurl, project, hide_legend=opts.hide_legend, csv=opts.csv, status_filter=opts.status_filter, name_filter=opts.name_filter, repo=opts.repo, arch=opts.arch, vertical=opts.vertical, show_excluded=opts.show_excluded))
|
||||
|
||||
|
||||
@cmdln.option('-q', '--hide-legend', action='store_true',
|
||||
|
@ -3892,7 +3892,7 @@ def get_results(apiurl, prj, package, lastbuild=None, repository=[], arch=[], ve
|
||||
|
||||
return r
|
||||
|
||||
def get_prj_results(apiurl, prj, hide_legend=False, csv=False, status_filter=None, name_filter=None, arch=None, repo=None, vertical=None, hide_disabled=None):
|
||||
def get_prj_results(apiurl, prj, hide_legend=False, csv=False, status_filter=None, name_filter=None, arch=None, repo=None, vertical=None, show_excluded=None):
|
||||
#print '----------------------------------------'
|
||||
|
||||
r = []
|
||||
@ -3931,7 +3931,7 @@ def get_prj_results(apiurl, prj, hide_legend=False, csv=False, status_filter=Non
|
||||
targets.sort()
|
||||
|
||||
# filter option
|
||||
if status_filter or name_filter or hide_disabled:
|
||||
if status_filter or name_filter or not show_excluded:
|
||||
|
||||
pacs_to_show = []
|
||||
targets_to_show = []
|
||||
@ -3958,12 +3958,12 @@ def get_prj_results(apiurl, prj, hide_legend=False, csv=False, status_filter=Non
|
||||
pacs_to_show.append(pkg)
|
||||
|
||||
#filter non building states
|
||||
elif hide_disabled:
|
||||
elif not show_excluded:
|
||||
enabled = {}
|
||||
for pkg in status.keys():
|
||||
showpkg = False
|
||||
for repo in status[pkg].keys():
|
||||
if status[pkg][repo] != "excluded" and status[pkg][repo] != "disabled":
|
||||
if status[pkg][repo] != "excluded":
|
||||
enabled[repo] = 1
|
||||
showpkg = True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user