[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: include filtered ftbfs issues in the .json output

Holger Levsen holger at moszumanska.debian.org
Sun May 17 13:32:04 UTC 2015


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

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 0c7f0fca338e9147cc033b5720d48d12cf0aa2f8
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sun May 17 15:31:08 2015 +0200

    reproducible: include filtered ftbfs issues in the .json output
---
 bin/reproducible_common.py       | 11 +++++++++++
 bin/reproducible_html_indexes.py | 11 -----------
 bin/reproducible_json.py         |  5 ++++-
 3 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py
index b937d72..a416d28 100755
--- a/bin/reproducible_common.py
+++ b/bin/reproducible_common.py
@@ -179,6 +179,17 @@ html_foot_page_style_note = Template((tab*2).join("""
 
 url2html = re.compile(r'((mailto\:|((ht|f)tps?)\://|file\:///){1}\S+)')
 
+# filter used on the index_FTBFS pages and for the reproducible.json
+filtered_issues = ('timestamps_from_cpp_macros' , 'ftbfs_werror_equals', 'bad_handling_of_extra_warnings', 'ftbfs_pbuilder_malformed_dsc', 'ftbfs_in_jenkins_setup', 'ftbfs_build_depends_not_available_on_amd64' )
+filter_query = ''
+for issue in filtered_issues:
+    if filter_query == '':
+        filter_query = 'n.issues LIKE "%' + issue + '%"'
+        filter_html = '<a href="' + REPRODUCIBLE_URL + ISSUES_URI + '/$suite/' + issue + '_issue.html">' + issue + '</a>'
+    else:
+        filter_query += ' OR n.issues LIKE "%' + issue + '%"'
+        filter_html += ' or <a href="' + REPRODUCIBLE_URL + ISSUES_URI + '/$suite/' + issue + '_issue.html">' + issue + '</a>'
+
 
 def print_critical_message(msg):
     print('\n\n\n')
diff --git a/bin/reproducible_html_indexes.py b/bin/reproducible_html_indexes.py
index 7a0cb16..3099110 100755
--- a/bin/reproducible_html_indexes.py
+++ b/bin/reproducible_html_indexes.py
@@ -46,17 +46,6 @@ Technically speaking, a page can be empty (we all love nonsense) but every
 section must have at least a `query` defining what to file in.
 """
 
-# filter used on the index_FTBFS pages
-filtered_issues = ('timestamps_from_cpp_macros' , 'ftbfs_werror_equals', 'bad_handling_of_extra_warnings', 'ftbfs_pbuilder_malformed_dsc', 'ftbfs_in_jenkins_setup', 'ftbfs_build_depends_not_available_on_amd64' )
-filter_query = ''
-for issue in filtered_issues:
-    if filter_query == '':
-        filter_query = 'n.issues LIKE "%' + issue + '%"'
-        filter_html = '<a href="' + REPRODUCIBLE_URL + ISSUES_URI + '/$suite/' + issue + '_issue.html">' + issue + '</a>'
-    else:
-        filter_query += ' OR n.issues LIKE "%' + issue + '%"'
-        filter_html += ' or <a href="' + REPRODUCIBLE_URL + ISSUES_URI + '/$suite/' + issue + '_issue.html">' + issue + '</a>'
-
 queries = {
     'count_total': 'SELECT COUNT(*) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite="{suite}" AND s.architecture="{arch}"',
     'reproducible_all': 'SELECT s.name FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite="{suite}" AND s.architecture="{arch}" AND r.status="reproducible" ORDER BY r.build_date DESC',
diff --git a/bin/reproducible_json.py b/bin/reproducible_json.py
index 89a1345..d5d7aaf 100755
--- a/bin/reproducible_json.py
+++ b/bin/reproducible_json.py
@@ -21,9 +21,12 @@ output = []
 
 log.info('Creating json dump of current reproducible status')
 
+# filter_query is defined in reproducible_common.py and excludes some FTBFS issues
 query = 'SELECT s.name, r.version, s.suite, s.architecture, r.status, r.build_date ' + \
         'FROM results AS r JOIN sources AS s ON r.package_id = s.id '+ \
-        'WHERE status != "" AND status != "FTBFS"'
+        'WHERE status != "" AND (( status != "FTBFS" ) OR ' \
+        ' ( status = "FTBFS" and r.package_id NOT IN (SELECT n.package_id FROM NOTES AS n WHERE ' + filter_query + ' )))'
+
 result = sorted(query_db(query))
 log.info('\tprocessing ' + str(len(result)))
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list