[Reproducible-commits] [misc] 01/01: clean-notes: add a check_notes_validity() to check if packages listed exist
Mattia Rizzolo
mapreri-guest at moszumanska.debian.org
Thu Jan 15 15:19:39 UTC 2015
This is an automated email from the git hooks/post-receive script.
mapreri-guest pushed a commit to branch master
in repository misc.
commit 7511de2c4fe6789e75c14cd4be23f00a1371b529
Author: Mattia Rizzolo <mattia at mapreri.org>
Date: Thu Jan 15 16:19:35 2015 +0100
clean-notes: add a check_notes_validity() to check if packages listed exist
---
clean-notes | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/clean-notes b/clean-notes
index 6c1b0b6..500bfb9 100755
--- a/clean-notes
+++ b/clean-notes
@@ -99,6 +99,20 @@ def load_notes():
notes = yaml.load(fd)
return notes
+def check_notes_validity(notes, testedpkgs):
+ failed = False
+ badpkgs = []
+ allpkgs = [i['package'] for i in testedpkgs]
+ for pkg in notes:
+ if pkg not in allpkgs:
+ badpkgs.append(pkg)
+ failed = True
+ print('CRITICAL: the package ' + pkg + \
+ ' was never tested. Maybe it\'s misspelled?')
+ if failed:
+ print('Aborting, please fix the notes file')
+ sys.exit(1)
+
def check_bugs(notes):
"""
This function check whether all the bugs listed in notes.git are usertagged
@@ -275,6 +289,7 @@ if __name__ == '__main__':
conn = start_udd_connection()
testedpkgs = load_reproducible_status()
notes = load_notes()
+ check_notes_validity(notes, testedpkgs)
toremove = find_old_notes(testedpkgs, notes)
notes = cleanup_notes(notes, toremove)
if 'not-usertagged' not in args.disable:
--
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