[Reproducible-commits] [misc] 01/01: clean-notes: add a mean to detect archived bugs in our notes

Mattia Rizzolo mattia at mapreri.org
Fri Aug 7 20:45:30 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 5a6c5b2b4210be5d1096605cd5cca3c9212c49c2
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Fri Aug 7 20:44:43 2015 +0000

    clean-notes: add a mean to detect archived bugs in our notes
---
 clean-notes | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/clean-notes b/clean-notes
index 1be71f6..9a6b9e2 100755
--- a/clean-notes
+++ b/clean-notes
@@ -69,6 +69,7 @@ if __name__ == '__main__':
         'not-usertagged',
         'now-fixed',
 #        'missing-version',
+#        'achived-bugs',
         ]
     args.disable.extend(disabled_features)
     for feature in args.enable:
@@ -307,6 +308,22 @@ def get_bugs():
     return bugs
 
 
+def detect_archived_bugs(notes):
+    query = 'SELECT u.id ' + \
+            'FROM bugs_usertags AS u JOIN archived_bugs AS a ON u.id=a.id ' + \
+            "WHERE u.email='reproducible-builds at lists.alioth.debian.org'"
+    rows = [x[0] for x  in query_udd(query)]
+    for pkg in sorted(notes.keys()):
+        try:
+            for bug in notes[pkg]['bugs']:
+                if bug in rows:
+                    log.warning(
+                        'https://bugs.debian.org/%s in %s is archived',
+                        bug, pkg)
+        except KeyError:
+            pass
+
+
 def parse_bugs(bugs):
     """
     This function return a dict:
@@ -424,7 +441,8 @@ def write_out(notes):
 
 if __name__ == '__main__':
     if 'not-usertagged' not in args.disable or \
-       'missing-usertagged' not in args.disable:
+       'missing-usertagged' not in args.disable or \
+       'archived-bugs' not in args.disable:
         conn = start_udd_connection()
     notes = load_notes()
     if not args.sort_only:
@@ -440,6 +458,8 @@ if __name__ == '__main__':
         bugs = get_bugs()
         bugs = parse_bugs(bugs)
         notes = join_notes_bugs(notes, bugs)
+    if 'archived-bugs' not in args.disable:
+        detect_archived_bugs(notes)
     if not args.dry_run:
         write_out(notes)
     else:

-- 
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