[Piuparts-commits] rev 267 - trunk

Holger Levsen holger at alioth.debian.org
Mon Mar 16 15:54:08 UTC 2009


Author: holger
Date: 2009-03-16 15:54:08 +0000 (Mon, 16 Mar 2009)
New Revision: 267

Modified:
   trunk/piuparts-report.py
Log:
emphasize reason

Modified: trunk/piuparts-report.py
===================================================================
--- trunk/piuparts-report.py	2009-03-16 15:00:26 UTC (rev 266)
+++ trunk/piuparts-report.py	2009-03-16 15:54:08 UTC (rev 267)
@@ -52,7 +52,7 @@
    <a href="http://www.debian.org/">
     <img src="http://piuparts.debian.org/images/debian.png" border="0" hspace="0" vspace="0" alt="Debian Project"></a>
   </div>
-  <br />
+  <br>
   <table class="reddy" width="100%">
    <tr>
     <td class="reddy">
@@ -124,7 +124,7 @@
 STATE_BODY_TEMPLATE = """
 <div id="main">
 <h1>Packages in state "%(state)s"</h1>
-<p>This page contains a list of package in state "%(state)s".</p>
+<p>This page contains a list of package in state "%(state)s". Last updated: %(time)s.</p>
 %(list)s
 </div>
 """
@@ -154,6 +154,15 @@
    planned. Join #debian-qa if you want to help.
  </p>
 
+ <p>
+  reports:
+  <ul>
+   <li><a href="/sid/">sid</a></li>
+   <li><a href="/squeeze/">squeeze</a></li>
+   <li><a href="/lenny2squeeze/">lenny2squeeze</a></li>
+  </ul>
+ </p>
+
  <p>These pages are updated every six hours. Last update: %(time)s </p>
 </div>
 """
@@ -230,11 +239,15 @@
     str = "&gt;".join(str.split(">"))
     str = "&#34;".join(str.split('"'))
     str = "&#39;".join(str.split("'"))
-    if str == "unknown-package":
-      str = "<b>unknown-package</b>"
     return str
 
 
+def emphasize_reason(str):
+    if str == "unknown-package" or str == "failed-testing":
+      str = "<b>" + str + "</b>"
+    return str
+
+
 def write_log_list_page(filename, title, preface, logs):
     packages = {}
     for pathname, package, version in logs:
@@ -392,7 +405,7 @@
                         for dep in package.dependencies():
                             list += "<li>dependency %s is %s</li>\n" % \
                                      (html_protect(dep), 
-                                      html_protect(st.state_by_name(dep)))
+                                      html_protect(emphasize_reason(st.state_by_name(dep))))
                         list += "</ul>\n"
                     list += "</li>\n"
                 list += "</ul>\n"
@@ -400,6 +413,7 @@
                                         "state-%s.html" % state),
                                         HTML_HEADER + STATE_BODY_TEMPLATE % {
                                         "state": html_protect(state),
+                                        "time": time.strftime("%Y-%m-%d %H:%M:%S %z"),
                                         "list": list
                                         } + HTML_FOOTER)
 




More information about the Piuparts-commits mailing list