Bug#650039: packages.qa.d.o: please add links to new buildd log check
Package: qa.debian.org
Severity: wishlist
Please add links to the new buildd log checks on
http://buildd.debian.org/~brlink to packages.qa.debian.org.
I guess what is needed is something like the following patch,
which is totally untested as I could not come up with a way
to test it (modeled after how lintian is done):
Index: www/xsl/pts-issues.xsl
===================================================================
--- www/xsl/pts-issues.xsl (revision 2667)
+++ www/xsl/pts-issues.xsl (working copy)
@@ -45,6 +45,22 @@
</xsl:if>
</xsl:template>
+ <xsl:template name="issue-logcheck">
+ <xsl:if test="$logcheck_errs + $logcheck_warns > 0">
+ <li>
+ <xsl:variable name="logcheck_url"><xsl:call-template name="mk_logcheck_url" /></xsl:variable>
+ <a href="http://buildd.debian.org/~brlink/">Buildd Log Checks</a><xsl:text> </xsl:text>
+ <xsl:text>reports </xsl:text>
+ <a href="{$logcheck_url}">
+ <xsl:if test="$logcheck_errs > 0"><xsl:value-of select="$logcheck_errs" /> error<xsl:if test="$logcheck_errs > 1">s</xsl:if></xsl:if>
+ <xsl:if test="$logcheck_errs > 0 and $logcheck_warns > 0"> and </xsl:if>
+ <xsl:if test="$logcheck_warns > 0"><xsl:value-of select="$logcheck_warns" /> warning<xsl:if test="$logcheck_warns > 1">s</xsl:if></xsl:if>
+ </a>
+ about this package.
+ </li>
+ </xsl:if>
+ </xsl:template>
+
<xsl:template name="issue-mentors-pending">
<xsl:if test="$hasmentors"> <!-- todo item about sponsoring mentors.d.n. uploads -->
<xsl:variable name="mentors_version"
Index: www/xsl/pts.xsl
===================================================================
--- www/xsl/pts.xsl (revision 2667)
+++ www/xsl/pts.xsl (working copy)
@@ -87,6 +87,10 @@
<xsl:variable name="lin_errs" select="$other/lintian/@errors" />
<xsl:variable name="lin_warns" select="$other/lintian/@warnings" />
+<!-- buildd log check summary -->
+<xsl:variable name="logcheck_errs" select="$other/logcheck/@errors" />
+<xsl:variable name="logcheck_warns" select="$other/logcheck/@warnings" />
+
<!-- Named templates aka functions -->
<xsl:template name="mk_lintian_url">
@@ -100,6 +104,14 @@
<xsl:value-of select="$package" />
</xsl:template>
+<xsl:template name="mk_logcheck_url">
+ <xsl:text>http://buildd.debian.org/~brlink/packages/</xsl:text>
+ <xsl:value-of select="substring($package,1,1)"/>
+ <xsl:text>/</xsl:text>
+ <xsl:value-of select="$package" />
+ <xsl:text>.html</xsl:text>
+</xsl:template>
+
<xsl:variable name="mirror">http://cdn.debian.net/debian</xsl:variable>
<xsl:variable name="security-mirror">http://security.debian.org/debian-security</xsl:variable>
<xsl:variable name="backports-mirror">http://backports.debian.org/debian-backports</xsl:variable>
@@ -1026,6 +1038,13 @@
<!-- </xsl:if> -->
</li>
</xsl:if>
+ <xsl:if test="$other/@logcheck='yes'">
+ <xsl:variable name="logcheck_url"><xsl:call-template name="mk_logcheck_url" /></xsl:variable>
+ <li>
+ <a title="report about issues spotted in buildd logs"
+ href="{$logcheck_url}">logcheck</a>
+ </li>
+ </xsl:if>
<li>
<a title="package popularity"
href="http://qa.debian.org/popcon.php?package={$escaped-package}">popcon</a>
@@ -1096,6 +1115,7 @@
<xsl:call-template name="issue-security" />
<xsl:call-template name="issue-nmu" />
<xsl:call-template name="issue-lintian" />
+ <xsl:call-template name="issue-logcheck" />
<xsl:call-template name="issue-mentors-pending" />
<xsl:call-template name="issue-comaintenance" />
<xsl:call-template name="issue-outdate-stdver" />
Index: www/bin/other_to_xml.py
===================================================================
--- www/bin/other_to_xml.py (revision 2667)
+++ www/bin/other_to_xml.py (working copy)
@@ -117,6 +117,16 @@
continue
return lintian
+def read_logcheck_info(fname):
+ data = {} # maps source pkg names to pairs <errors_no, warnings_no>
+ for line in open(fname).readlines():
+ try:
+ (pkg, errors_no, warnings_no) = line.split()[:3]
+ data[pkg] = (int(errors_no), int(warnings_no))
+ except ValueError:
+ continue
+ return data
+
# parse textual files with lines like "field: value"
def read_mapping(fname):
f = open(fname)
@@ -316,6 +326,9 @@
# read QA lintian info
lintian = read_lintian_info(os.path.join(dir, "lintian.qa-list.txt"))
+# read builddlogcheck info
+logcheck = read_logcheck(os.path.join(dir, "logcheck.txt"))
+
# read the list of packages indexed by svnbuildstat.debian.net
svnbuildstat = {}
try:
@@ -599,6 +612,19 @@
root_elt.setAttribute("lintian", "no")
lintian_sig = (0, 0)
+ # add logcheck info
+ if logcheck.has_key(pkg):
+ (errs, warns) = logcheck[pkg]
+ elt = doc.createElement("logcheck")
+ elt.setAttribute("errors", str(errs))
+ elt.setAttribute("warnings", str(warns))
+ root_elt.appendChild(elt)
+ root_elt.setAttribute("logcheck", "yes")
+ logcheck_sig = (errs, warns)
+ else:
+ root_elt.setAttribute("logcheck", "no")
+ logcheck_sig = (0, 0)
+
# add short descriptions
elt = doc.createElement("descriptions")
root_elt.appendChild(elt)
@@ -639,7 +665,7 @@
ubuntu_sig, s_rc, s_normal, s_wishlist, s_fixed, s_gift, s_help,
subsig, svnbuildstat_sig, transitions_sig, lintian_sig,
shortdesc_sig, piuparts_sig, new_queue_sig, i18n_sig,
- fonts_sig, sec_sig)
+ fonts_sig, sec_sig, logcheck_sig)
if sigs.has_key(pkg) and sig == sigs[pkg] and \
os.path.isfile("%s/%s/%s/other.xml" % (odir, hash, pkg)):
continue
Index: www/bin/update_incoming.sh
===================================================================
--- www/bin/update_incoming.sh (revision 2667)
+++ www/bin/update_incoming.sh (working copy)
@@ -99,6 +99,9 @@
#nice_wget http://lintian.debian.org/lintian.log lintian.log
nice_wget http://lintian.debian.org/qa-list.txt lintian.qa-list.txt
+# Download builddlogcheck info
+nice_wget https://buildd.debian.org/~brlink/logcheck.txt logcheck.txt
+
# Download bugs summary
nice_wget http://udd.debian.org/cgi-bin/bugs-binpkgs-pts.cgi bugs.txt
nice_wget http://udd.debian.org/cgi-bin/ddpo-bugs.cgi bugs-src.txt
Bernhard R. Link
Reply to: