[Reproducible-commits] [notes] 01/05: bin/filter-packages: --issues (nee --issue) can take multiple arguments
Chris Lamb
lamby at moszumanska.debian.org
Sat Feb 7 22:55:38 UTC 2015
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository notes.
commit aa5b8a384f2cff8bf310a458755a13e88d1c53ac
Author: Chris Lamb <lamby at debian.org>
Date: Sat Feb 7 22:41:56 2015 +0000
bin/filter-packages: --issues (nee --issue) can take multiple arguments
---
bin/filter-packages | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/bin/filter-packages b/bin/filter-packages
index 1a4975d..b41a804 100755
--- a/bin/filter-packages
+++ b/bin/filter-packages
@@ -6,8 +6,8 @@ import optparse
def main():
parser = optparse.OptionParser()
- parser.add_option('--issue', dest='issue', default=None,
- help="only print packages with issue ISSUE")
+ parser.add_option('--issues', dest='issues', default=None,
+ help="only print packages with comma-separated issues ISSUES")
parser.add_option('--has-bugs', dest='bugs', action='store_true',
help="only print packages with bug(s) listed")
parser.add_option('--no-bugs', dest='bugs', action='store_false',
@@ -22,11 +22,13 @@ def main():
if args:
parser.error("command does not take any arguments")
+ if options.issues is not None:
+ options.issues = set(options.issues.split(','))
+
packages = yaml.safe_load(open('./packages.yml'))
for x, y in sorted(packages.iteritems()):
- if options.issue is not None and \
- options.issue not in y.get('issues', ()):
+ if not options.issues <= set(y.get('issues', ())):
continue
if options.bugs is not None and options.bugs ^ ('bugs' in y):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/notes.git
More information about the Reproducible-commits
mailing list