webapp: use a package-specific debcheck link
authorHelmut Grohne <helmut@subdivi.de>
Fri, 10 May 2019 15:10:08 +0000 (17:10 +0200)
committerHelmut Grohne <helmut@subdivi.de>
Fri, 10 May 2019 15:10:08 +0000 (17:10 +0200)
Reported-by: Paul Wise <pabs@debian.org>
webapp.py

index 52defa3..6d1ad76 100644 (file)
--- a/webapp.py
+++ b/webapp.py
@@ -146,17 +146,19 @@ footer {
      {%- endif -%}
     </tbody>
    </table>
-   <h5>See also</h5>
-   <ul>
-    {%- if show_bootstrapdn -%}
+   {%- if show_debcheck -%}
+    <h5>See also</h5>
+    <ul>
+     {%- if show_bootstrapdn -%}
+      <li>
+       <a href="https://bootstrap.debian.net/cross_all/{{ sourcepackage|e }}.html">bootstrap.debian.net</a>
+      </li>
+     {%- endif -%}
      <li>
-      <a href="https://bootstrap.debian.net/cross_all/{{ sourcepackage|e }}.html">bootstrap.debian.net</a>
+      <a href="https://qa.debian.org/dose/debcheck/cross_unstable_main_amd64/latest/packages/{{ sourcepackage|e }}.html">debcheck</a>
      </li>
-    {%- endif -%}
-    <li>
-     <a href="https://qa.debian.org/dose/debcheck/cross_unstable_main_amd64/">debcheck</a>
-    </li>
-   </ul>
+    </ul>
+   {%- endif -%}
   </section>
   <section>
    <h3>Cross builds</h3>
@@ -305,6 +307,8 @@ def show_source(source):
         context["show_bootstrapdn"] = \
                 any(reason and not reason.startswith("skew ")
                     for reason in context["depresult"].keys())
+        context["show_debcheck"] = \
+                any(context["depresult"].keys())
     return flask.render_template_string(src_template, **context)
 
 @app.route("/build/<path:filename>")