[Reproducible-commits] [misc] 06/06: mistagged-as-not-testing shows packages which ftbfs in testing but are BTS as sid-only

Chris West faux-guest at moszumanska.debian.org
Mon Dec 14 12:06:58 UTC 2015


This is an automated email from the git hooks/post-receive script.

faux-guest pushed a commit to branch master
in repository misc.

commit d833b730fbf5021c614adcafbb56103243757d91
Author: Chris West (Faux) <git at goeswhere.com>
Date:   Mon Dec 14 12:05:16 2015 +0000

    mistagged-as-not-testing shows packages which ftbfs in testing but are BTS as sid-only
---
 mistagged-as-not-testing.py | 43 +++++++++++++++++++++++++++++++++++++++++++
 remote.py                   |  9 +++++++--
 2 files changed, 50 insertions(+), 2 deletions(-)

diff --git a/mistagged-as-not-testing.py b/mistagged-as-not-testing.py
new file mode 100644
index 0000000..430c7ef
--- /dev/null
+++ b/mistagged-as-not-testing.py
@@ -0,0 +1,43 @@
+#!/usr/bin/python3
+# -*- coding: utf-8 -*-
+
+from collections import defaultdict
+
+import remote
+
+
+def possible_bugs():
+    conn = remote.start_udd_connection()
+    package_to_bugs = defaultdict(list)
+    for row in remote.query_udd(conn,
+                                """SELECT bugs.id, bugs.source, bugs.title
+                                   FROM bugs INNER JOIN bugs_usertags USING (id)
+                                   WHERE email='reproducible-builds at lists.alioth.debian.org' AND tag='ftbfs'
+                                      AND severity IN ('critical', 'grave', 'serious')
+                                      AND affects_unstable AND NOT affects_testing
+                                      AND status='pending'"""):
+        package_to_bugs[row[1]].append((row[0], row[2]))
+
+    return package_to_bugs
+
+
+def package_status():
+    package_suite_status = defaultdict(dict)
+    for record in remote.load_json():
+        if 'amd64' == record['architecture']:
+            package_suite_status[record['package']][record['suite']] = record['status']
+    return package_suite_status
+
+if '__main__' == __name__:
+    package_suite_status = package_status()
+
+    for package, bugs in possible_bugs().items():
+        this_package = package_suite_status[package]
+        if 'unstable' not in this_package or 'FTBFS' != this_package['unstable']:
+            continue
+        if 'testing' in this_package and 'FTBFS' == this_package['testing']:
+            print('{}/rb-pkg/testing/amd64/{}.html'
+                  .format(remote.RB_SITE, package))
+            for bug in bugs:
+                print(' * https://bugs.debian.org/{}: {}'.format(bug[0], bug[1]))
+            print()
diff --git a/remote.py b/remote.py
index 8f90d32..7fd3694 100644
--- a/remote.py
+++ b/remote.py
@@ -15,13 +15,18 @@ REPRODUCIBLE_JSON = '{}/reproducible.json'.format(RB_SITE)
 log = logger.setup_logging(__name__)
 
 
-def load_reproducible_status():
-    status = {}
+def load_json():
     try:
         with open('reproducible.json') as f:
             rstatus = json.load(f)
     except FileNotFoundError:
         rstatus = requests.get(REPRODUCIBLE_JSON).json()
+    return rstatus
+
+
+def load_reproducible_status():
+    status = {}
+    rstatus = load_json()
 
     for item in rstatus:
         pkg = item['package']

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