summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_common.py4
-rwxr-xr-xbin/reproducible_common.sh2
-rwxr-xr-xbin/reproducible_html_indexes.py16
3 files changed, 12 insertions, 10 deletions
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py
index 6dedc05a..b937d72f 100755
--- a/bin/reproducible_common.py
+++ b/bin/reproducible_common.py
@@ -155,8 +155,8 @@ html_head_page = Template((tab*2).join("""
</a>
</li>
<li><a href="/index_issues.html">issues</a></li>
- <li><a href="/index_notes.html">packages with notes</a></li>
- <li><a href="/index_no_notes.html">package without notes</a></li>
+ <li><a href="/$suite/$arch/index_notes.html">packages with notes</a></li>
+ <li><a href="/$suite/$arch/index_no_notes.html">packages without notes</a></li>
<li><a href="/index_scheduled.html">currently scheduled</a></li>
$links
<li><a href="/index_repositories.html">repositories overview</a></li>
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index d40c1a82..5ffc22f2 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -160,7 +160,7 @@ write_page_header() {
MAINVIEW="stats"
ALLSTATES="reproducible FTBR FTBFS 404 not_for_us blacklisted"
ALLVIEWS="issues notes no_notes scheduled last_24h last_48h all_abc dd-list pkg_sets suite_stats repositories stats"
- GLOBALVIEWS="issues notes no_notes scheduled repositories stats"
+ GLOBALVIEWS="issues scheduled repositories stats"
SUITEVIEWS="dd-list suite_stats"
SPOKENTARGET["issues"]="issues"
SPOKENTARGET["notes"]="packages with notes"
diff --git a/bin/reproducible_html_indexes.py b/bin/reproducible_html_indexes.py
index 0d86db9e..1810877c 100755
--- a/bin/reproducible_html_indexes.py
+++ b/bin/reproducible_html_indexes.py
@@ -40,6 +40,7 @@ Reference doc for the folowing lists:
- the query also takes the value "status"
- if "nosuite" is True, then suite and arch are meant to be the default
values specified in _common.py, and they will not iterate over the suites
+ + notes: if true the query also takes the value "status"
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.
@@ -254,10 +255,10 @@ pages = {
]
},
'notes': {
- 'global': True,
+ 'notes': True,
'title': 'Packages with notes',
- 'header': '<p>There are {tot} packages with notes.</p>',
- 'header_query': 'SELECT count(*) FROM (SELECT * FROM sources AS s JOIN notes AS n ON n.package_id=s.id GROUP BY s.name) AS tmp',
+ 'header': '<p>There are {tot} packages with notes in {suite}/{arch}.</p>',
+ 'header_query': 'SELECT count(*) FROM (SELECT * FROM sources AS s JOIN notes AS n ON n.package_id=s.id WHERE s.suite="{suite}" AND s.architecture="{arch}" GROUP BY s.name) AS tmp',
'body': [
{
'icon_status': 'FTBR',
@@ -302,10 +303,10 @@ pages = {
]
},
'no_notes': {
- 'global': True,
+ 'notes': True,
'title': 'Packages without notes',
- 'header': '<p>There are {tot} faulty packages without notes, in all suites. These are the packages with failures that still need to be investigated.</p>',
- 'header_query': 'SELECT COUNT(*) FROM (SELECT s.id FROM sources AS s JOIN results AS r ON r.package_id=s.id WHERE r.status IN ("unreproducible", "FTBFS", "blacklisted") AND s.id NOT IN (SELECT package_id FROM notes))',
+ 'header': '<p>There are {tot} faulty packages without notes in {suite}/{arch}. These are the packages with failures that still need to be investigated.</p>',
+ 'header_query': 'SELECT COUNT(*) FROM (SELECT s.id FROM sources AS s JOIN results AS r ON r.package_id=s.id WHERE r.status IN ("unreproducible", "FTBFS", "blacklisted") AND s.id NOT IN (SELECT package_id FROM notes) AND s.suite="{suite}" AND s.architecture="{arch}")',
'body': [
{
'icon_status': 'FTBR',
@@ -375,6 +376,7 @@ def build_page_section(page, section, suite, arch):
if pages[page].get('global') and pages[page]['global']:
suite = defaultsuite if not suite else suite
arch = defaultarch if not arch else arch
+ if pages[page].get('notes') and pages[page]['notes']:
query = queries[section['query']].format(
status=section['db_status'], suite=suite, arch=arch)
else:
@@ -423,7 +425,7 @@ def build_page(page, suite=None, arch=None):
if pages[page].get('header'):
if pages[page].get('header_query'):
html += pages[page]['header'].format(
- tot=query_db(pages[page]['header_query'])[0][0])
+ tot=query_db(pages[page]['header_query'].format(suite=suite, arch=arch))[0][0], suite=suite, arch=arch)
else:
html += pages[page].get('header')
for section in page_sections: