[Reproducible-commits] [misc] 01/01: unreproducible-installed: add option --show-issues.
Valentin Lorentz
progval-guest at moszumanska.debian.org
Thu Aug 27 19:51:57 UTC 2015
This is an automated email from the git hooks/post-receive script.
progval-guest pushed a commit to branch master
in repository misc.
commit 4afcdaa5e5ef5e7312d37e4334ad05146b25f2f8
Author: Valentin Lorentz <progval at progval.net>
Date: Thu Aug 27 21:52:57 2015 +0200
unreproducible-installed: add option --show-issues.
---
unreproducible-installed | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/unreproducible-installed b/unreproducible-installed
index 984238d..5923ce8 100755
--- a/unreproducible-installed
+++ b/unreproducible-installed
@@ -38,6 +38,8 @@ DEFAULT_EXCLUDED_STATUSES = ['reproducible', 'FTBFS']
parser = argparse.ArgumentParser(
description='Lists unreproducible packages installed on this system.')
+parser.add_argument('--show-issues', action='store_true',
+ help='Show the list of issues identified with this package.')
rj_group = parser.add_argument_group('reproducible.json')
rj_group.add_argument('--max-age', type=int, default=60*60,
help='Maximum age of the reproducible.json file. If the file is older, '
@@ -51,7 +53,7 @@ rj_group.add_argument('--save-to', type=str, default=None,
help='Where to store the reproducible.json if it was downloaded. '
'Defaults to --file-name if given, %s otherwise.' %
DEFAULT_SAVE_TO)
-npy_group = parser.add_argument_group('nodes/packages.yml')
+npy_group = parser.add_argument_group('notes/packages.yml')
npy_group.add_argument('--ignore-with-bugs', action='store_true',
help='Do not show packages with bugs reported by the RB team.')
npy_group.add_argument('--package-notes-file', type=str,
@@ -176,13 +178,19 @@ def main(args):
installed = get_installed_packages(args)
+ max_name_length = max(map(len, installed & unreproducible))
for package in sorted(installed & unreproducible):
- print(package)
+ issues = notes.get(package, {}).get('issues', [])
+ if args.show_issues and issues:
+ print('%s %s' %
+ (package.ljust(max_name_length), ' '.join(issues)))
+ else:
+ print(package)
if __name__ == '__main__':
args = parser.parse_args()
if not yaml:
- require_yaml = ['ignore-with-bugs', 'with-issue']
+ require_yaml = ['ignore-with-bugs', 'with-issue', 'show-issues']
errors = []
for option in require_yaml:
if not getattr(args, option.replace('-', '_')):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git
More information about the Reproducible-commits
mailing list