summaryrefslogtreecommitdiff
path: root/webapp.py
diff options
context:
space:
mode:
Diffstat (limited to 'webapp.py')
-rw-r--r--webapp.py65
1 files changed, 63 insertions, 2 deletions
diff --git a/webapp.py b/webapp.py
index 6d1ad76..8acf92f 100644
--- a/webapp.py
+++ b/webapp.py
@@ -38,6 +38,7 @@ index_template = """<!DOCTYPE html>
<th>architecture</th>
<th>started</th>
<th>result log</th>
+ <th>bugs</th>
</tr>
</thead>
<tbody>
@@ -57,6 +58,13 @@ index_template = """<!DOCTYPE html>
<a href="{{ url_for("show_log", filename=build.filename[:-3]) }}">log</a>
<a href="{{ url_for("show_log", filename=build.filename) }}">xz</a>
</td>
+ <td>
+ {%- if build.buglvl == 2 -%}
+ patch reported
+ {%- elif build.buglvl == 1 -%}
+ bug reported
+ {%- endif -%}
+ </td>
</tr>
{%- endfor -%}
</tbody>
@@ -73,7 +81,19 @@ index_template = """<!DOCTYPE html>
</html>
"""
-src_template = """<!DOCTYPE html>
+src_template = """
+{%- macro render_bug(bugobj) -%}
+ <a href="https://bugs.debian.org/{{ bugobj.bugnum }}">#{{ bugobj.bugnum }}</a>
+ {%- if bugobj.patched %}
+ [<abbr title="patch available">+</abbr>]
+ {%- endif -%}:
+ {% if bugobj.package != "src:" + bugobj.affects and
+ not bugobj.title.startswith(bugobj.affects + ":") -%}
+ {{- bugobj.package|e }}:
+ {% endif -%}
+ {{- bugobj.title|e -}}
+{%- endmacro -%}
+<!DOCTYPE html>
<html>
<head>
<title>{{ sourcepackage|e }} - Debian cross build</title>
@@ -121,8 +141,30 @@ footer {
</a>
</h1>
</header>
+ {%- if bugs.ftbfs -%}
+ <section>
+ <h3>Reported <abbr title="fails to build from source">FTBFS</abbr> bugs</h3>
+ <ul>
+ {%- for bug in bugs.ftbfs|sort(attribute="bugnum") -%}
+ <li>
+ {{- render_bug(bug) -}}
+ </li>
+ {%- endfor -%}
+ </ul>
+ </section>
+ {%- endif -%}
<section>
<h3>Cross build dependency satisfiability</h3>
+ {%- if bugs.bdsat -%}
+ <h5>Reported satisfiability problems</h5>
+ <ul>
+ {%- for bug in bugs.bdsat|sort(attribute="bugnum") -%}
+ <li>
+ {{- render_bug(bug) -}}
+ </li>
+ {%- endfor -%}
+ </ul>
+ {%- endif -%}
<table>
<thead>
<tr>
@@ -162,6 +204,16 @@ footer {
</section>
<section>
<h3>Cross builds</h3>
+ {%- if bugs.ftcbfs -%}
+ <h5>Reported cross build failures</h5>
+ <ul>
+ {%- for bug in bugs.ftcbfs|sort(attribute="bugnum") -%}
+ <li>
+ {{- render_bug(bug) -}}
+ </li>
+ {%- endfor -%}
+ </ul>
+ {%- endif -%}
{%- if builds -%}
<table>
<thead>
@@ -285,7 +337,10 @@ def collect_depstate(conn, source):
def show_index():
with db.engine.connect() as conn:
builds = list(conn.execute("""
- SELECT source, version, architecture, starttime, filename
+ SELECT source, version, architecture, starttime, filename,
+ ifnull((SELECT max(patched + 1) FROM bugs
+ WHERE affects = source),
+ 0) AS buglvl
FROM builds
WHERE success = 0
ORDER BY starttime
@@ -304,6 +359,12 @@ def show_source(source):
SELECT version, architecture, success, starttime, filename
FROM builds WHERE source = :source;""")
context["builds"] = list(conn.execute(query, source=source))
+ query = sqlalchemy.text("""
+ SELECT bugnum, kind, title, package, patched, affects
+ FROM bugs WHERE affects = :affects;""")
+ context["bugs"] = {}
+ for bug in conn.execute(query, affects=source):
+ context["bugs"].setdefault(bug.kind, []).append(bug)
context["show_bootstrapdn"] = \
any(reason and not reason.startswith("skew ")
for reason in context["depresult"].keys())