Mailinglist Archive: opensuse-buildservice (233 mails)

< Previous Next >
[opensuse-buildservice] little patch for osc rprjresults filter option
  • From: Werner Hoch <werner.ho@xxxxxx>
  • Date: Sun, 21 Dec 2008 22:13:10 +0100
  • Message-id: <200812212213.10841.werner.ho@xxxxxx>
Hi there,

this is a small patch to enhance the osc rpjresuls status filter option.

osc currently accepts only one filter letter.

osc rprjresults -q -s s science

With attached patch you can use as many status letters as you like:

osc rprjresults -q -s "%sBEFfb" science

Regards
Werner (werner2101)
diff --git a/osc/core.py b/osc/core.py
index 17fd945..243aea1 100755
--- a/osc/core.py
+++ b/osc/core.py
@@ -2676,22 +2676,18 @@ def get_prj_results(apiurl, prj, hide_legend=False,
csv=False, status_filter=Non
pacs_to_show = []
targets_to_show = []

- #filtering for Package Status
+ #filtering for Package Status
if status_filter:
- if status_filter in buildstatus_symbols.values():
- for txt, sym in buildstatus_symbols.items():
- if sym == status_filter:
- filt_txt = txt
- for pkg in status.keys():
- for repo in status[pkg].keys():
- if status[pkg][repo] == filt_txt:
- if not name_filter:
- pacs_to_show.append(pkg)
- targets_to_show.append(repo)
- elif name_filter in pkg:
- pacs_to_show.append(pkg)
-
- #filtering for Package Name
+ for pkg in status.keys():
+ for repo in status[pkg].keys():
+ if buildstatus_symbols[status[pkg][repo]] in status_filter:
+ if not name_filter:
+ pacs_to_show.append(pkg)
+ targets_to_show.append(repo)
+ elif name_filter in pkg:
+ pacs_to_show.append(pkg)
+
+ #filtering for Package Name
elif name_filter:
for pkg in pacs:
if name_filter in pkg:
diff --git a/osc/core.pyc b/osc/core.pyc
index fb822e2..42c8c32 100644
Binary files a/osc/core.pyc and b/osc/core.pyc differ
< Previous Next >
This Thread
Follow Ups