summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-03-03 02:08:47 +0100
committerHolger Levsen <holger@layer-acht.org>2015-03-03 02:10:01 +0100
commit0db9ace8b51469372958f8412d78bef38e3ee824 (patch)
tree4d19e078f8a1586f844df90a7434d2ba929ba743
parent0f11fea30f0343f9b53c33de4b64c366f630fe84 (diff)
downloadjenkins.debian.net-0db9ace8b51469372958f8412d78bef38e3ee824.tar.xz
reproducible: fixup syntax in last commit
-rwxr-xr-xbin/reproducible_html_indexes.py4
-rw-r--r--etc/apache2/sites-available/jenkins.debian.net8
2 files changed, 10 insertions, 2 deletions
diff --git a/bin/reproducible_html_indexes.py b/bin/reproducible_html_indexes.py
index a0414ffb..82f19704 100755
--- a/bin/reproducible_html_indexes.py
+++ b/bin/reproducible_html_indexes.py
@@ -43,7 +43,7 @@ section must have at least a `query` defining what to file in.
"""
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}"'
+ '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}"',
'scheduled': 'SELECT s.name FROM schedule AS p JOIN sources AS s ON p.package_id=s.id WHERE s.suite="{suite}" AND s.architecture="{arch}" ORDER BY p.date_scheduled',
'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',
'reproducible_last24h': '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" AND r.build_date > datetime("now", "-24 hours") ORDER BY r.build_date DESC',
@@ -258,7 +258,7 @@ global_pages = {
def build_leading_text_section(section, rows, suite, arch):
html = '<p>\n' + tab
total = len(rows)
- count_total = int(query_db(queries['count_total'])[0][0])
+ count_total = int(query_db(queries['count_total'].format(suite=suite, arch=arch))[0][0])
try:
percent = round(((total/count_total)*100), 1)
except ZeroDivisionError:
diff --git a/etc/apache2/sites-available/jenkins.debian.net b/etc/apache2/sites-available/jenkins.debian.net
index 03de535e..a2799fbe 100644
--- a/etc/apache2/sites-available/jenkins.debian.net
+++ b/etc/apache2/sites-available/jenkins.debian.net
@@ -204,4 +204,12 @@ Use common-debian-service-https-redirect reproducible.debian.net
RewriteCond %{REQUEST_URI} ^/index_all_abc.html$
RewriteRule ^/?(.+) /sid/amd64/$1 [R=301,L]
+ # redirect (/sid|/experimental) to (/sid|/experimental)/index_suite_stats.html
+ RewriteCond %{HTTP_HOST} reproducible\.debian\.net
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteCond %{REQUEST_URI} ^/$
+ RewriteRule ^/(.*) /reproducible.html [R,L]
+
+
+
</VirtualHost>