Bug#728298: patch to add bootstrapping hints to the pts
tags 728298 patch
thank you
I wrote the attached patch to fix this bug. This is completely untested. Sorry.
Index: www/bin/other_to_xml.py
===================================================================
--- www/bin/other_to_xml.py (revision 3141)
+++ www/bin/other_to_xml.py (working copy)
@@ -81,6 +81,18 @@
sources[source].append((size, pkg_a, pkg_b))
return sources
+def read_bootstrap(fname):
+ sources = {}
+ with open(fname) as f:
+ data = json.load(f)
+ sources = {}
+ for pkg,ver in data:
+ # remove "src:" prefix from source package name
+ pkg = pkg[4:]
+ if pkg not in sources: sources[pkg] = []
+ sources[pkg].append(ver)
+ return sources
+
def read_shortdesc(fname):
global binary2sources
source_descs = {} # source package -> (binary package -> short description)
@@ -556,6 +568,8 @@
dedup_packages = read_dedup(os.path.join(dir, "dedup.txt"))
+bootstrap_packages = read_bootstrap(os.path.join(dir, "bootstrap.json"))
+
upstream_info_packages = read_upstream_info(os.path.join(dir, "upstream-info.txt"))
# read release goals information
@@ -1013,6 +1027,21 @@
root_elt.setAttribute("dedup", "no")
dedup_sig = ''
+ # add bootstrapping links
+ if pkg in bootstrap_packages:
+ elt = doc.createElement("bootstrap")
+ root_elt.appendChild(elt)
+ root_elt.setAttribute("bootstrap", "yes")
+ for version in bootstrap_packages[pkg]:
+ version_elt = doc.createElement("version")
+ text_elt = doc.createTextNode(version)
+ version_elt.appendChild(text_elt)
+ elt.appendChild(version_elt)
+ bootstrap_sig = bootstrap_packages[pkg]
+ else:
+ root_elt.setAttribute("bootstrap", "no")
+ bootstrap_sig = ''
+
# Add upstream info links
if pkg in upstream_info_packages:
root_elt.setAttribute("upstreaminfo", "yes")
@@ -1092,7 +1121,7 @@
watchbroken_sig, watchavail_sig, depneedsmaint_sig, dms_sig,
fonts_sig, sec_sig, logcheck_sig, rg_sig, url_issues_sig,
screenshots_sig, clang_sig, dedup_sig, longdesc_sig,
- upstream_info_sig, autoremoval_sig, testing_sig)
+ upstream_info_sig, autoremoval_sig, testing_sig, bootstrap_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 3141)
+++ www/bin/update_incoming.sh (working copy)
@@ -209,6 +209,9 @@
get http://dedup.debian.net/static/ptslist.txt dedup.txt
+# download bootstrapping hints
+get http://bootstrap.debian.net/source/stats_min.json bootstrap.json
+
nice_redirect_to upstream-info.txt svn ls -R svn://svn.debian.org/svn/collab-qa/packages-metadata
# testing autoremoval info
Index: www/xsl/pts-issues.xsl
===================================================================
--- www/xsl/pts-issues.xsl (revision 3141)
+++ www/xsl/pts-issues.xsl (working copy)
@@ -422,6 +422,17 @@
</xsl:if>
</xsl:template>
+ <xsl:template name="issue-bootstrap">
+ <xsl:if test="$hasother and $other/@bootstrap='yes'">
+ <xsl:for-each select="$other/bootstrap/version">
+ <li>
+ Version <xsl:value-of select="text()"/> of this package is part of the bootstrapping problem.
+ Consider following the <a href="http://bootstrap.debian.net/source/{$package}_{text()}.html">generated bootstrapping hints</a>
+ </li>
+ </xsl:for-each>
+ </xsl:if>
+ </xsl:template>
+
<xsl:template name="issue-testing-failed">
<xsl:if test="$hasother and $other/@testing='yes' and $other/testing/@status!='pass'">
<li>
Index: www/xsl/pts.xsl
===================================================================
--- www/xsl/pts.xsl (revision 3141)
+++ www/xsl/pts.xsl (working copy)
@@ -1202,6 +1202,11 @@
<a title="duplicate and similar files" href="http://dedup.debian.net/source/{$package}">dedup</a>
</li>
</xsl:if>
+ <xsl:if test="$other/@bootstrap='yes'">
+ <li>
+ <a title="bootstrapping issues" href="http://bootstrap.debian.net/source/{$package}.html">bootstrap</a>
+ </li>
+ </xsl:if>
<li>
<img src="../common/rdf.png" alt="rdf" /> <a title="Alternate RDF meta-data (Turtle)" href="{$package}.ttl">RDF meta-data</a>
</li>
@@ -1241,6 +1246,7 @@
<xsl:call-template name="issue-watchavail" />
<xsl:call-template name="issue-depneedsmaint" />
<xsl:call-template name="issue-dedup" />
+ <xsl:call-template name="issue-bootstrap" />
<xsl:if test="$hasother">
<xsl:for-each select="$other/todo/item">
<xsl:call-template name="outputitem" />
Reply to: