Bug#728298:
Bug#728298: patch to add bootstrapping hints to the pts
Control: tags -1 - patch Control: reassign -1 tracker.debian.org On Wed, Apr 30, 2014 at 09:17:01AM +0200, Johannes Schauer wrote: The attached patch restricts the issues highlighted in the todo box to the self cycles as these are the only hard result that we can get. All other results are merely suggestions. The patch you have prepared needs to be rewritten for the new distro tracker site, which is written in django and will replace the PTS. https://tracker.debian.org/docs/contributing.html -- bye, pabs https://wiki.debian.org/PaulWise signature.asc Description: This is a digitally signed message part
Bug#728298: patch to add bootstrapping hints to the pts
The attached patch restricts the issues highlighted in the todo box to the self cycles as these are the only hard result that we can get. All other results are merely suggestions. This information should only be included once it is possible to upload packages with the build profile syntax. Thanks! 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,27 @@ 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),stats in data: +# remove src: prefix from source package name +pkg = pkg[4:] +selfcycles = set() +for (strong_on,bd_on),_ in stats.get('type1cycles',[])+stats.get('type2cycles',[]): +# they should never be empty but just to be sure +if not strong_on or not bd_on: +continue +# remove version to be able to merge more +strong_on = [p for p,_ in strong_on] +bd_on = [p for p,_ in bd_on] +selfcycles.add((frozenset(strong_on),frozenset(bd_on))) +if pkg not in sources: sources[pkg] = set() +sources[pkg].update(selfcycles) +return sources + def read_shortdesc(fname): global binary2sources source_descs = {} # source package - (binary package - short description) @@ -556,6 +577,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 +1036,35 @@ root_elt.setAttribute(dedup, no) dedup_sig = '' +# add bootstrapping links +if pkg in bootstrap_packages: +root_elt.setAttribute(bootstrap, yes) +if bootstrap_packages[pkg]: +elt = doc.createElement(selfcycles) +root_elt.appendChild(elt) +root_elt.setAttribute(selfcycles, yes) +for strong_on,bd_on in bootstrap_packages[pkg]: +selfcycle_elt = doc.createElement(selfcycle) +strong_on = sorted(strong_on) +if len(strong_on) == 1: +strong_on = strong_on[0] +else: +strong_on = and .join([, .join(strong_on[:-1]),strong_on[-1]]) +bd_on = sorted(bd_on) +if len(bd_on) == 1: +bd_on = bd_on[0] +else: +bd_on = and .join([, .join(bd_on[:-1]),bd_on[-1]]) +selfcycle_elt.setAttribute(strong_on, strong_on) +selfcycle_elt.setAttribute(bd_on, bd_on) +elt.appendChild(selfcycle_elt) +else: +root_elt.setAttribute(selfcycles, no) +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 +1144,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.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,22 @@ /xsl:if /xsl:template + xsl:template name=issue-selfcycles +xsl:if test=$hasother and $other/@selfcycles='yes' + xsl:for-each select=$other/selfcycles/selfcycle +li + It must be possible to build this source package without + xsl:value-of select=@bd_on /. Otherwise this source package + requires binary packages it builds + (xsl:value-of select=@strong_on /) to build itself and thus + creates a cyclic build dependency. + See a
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()}.htmlgenerated 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}.ttlRDF 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 /
Bug#728298: PTS: Please add bootstrapping hints from bootstrap.debian.net to appropriate source packages
Package: qa.debian.org Severity: wishlist User: qa.debian@packages.debian.org Usertags: pts Hi, Paul Wise was recently so kind to make bootstrap.debian.net a CNAME to a server of mine where I'm now hosting bootstrapping hints for whole architectures as well as for individual packages: http://bootstrap.debian.net/ The data is generated daily from the midnight snapshot.debian.org snapshot. You can either view the results for one architecture: http://bootstrap.debian.net/amd64/stats.html Or for a particular source packages: http://bootstrap.debian.net/source/avahi_0.6.31-2.html I think it would be helpful for future bootstrapping purposes if the pts could link to this information for the affected source packages. The raw data is available in JSON format. Either per architecture (see the table on the front page) or in a structure that summarized the relevant data for all affected source packages: http://bootstrap.debian.net/source/stats.json There is also a list of only the source package names if that helps to avoid downloading a couple of megabytes each time: http://bootstrap.debian.net/source/stats_min.json I'm just now finished with writing the html generating python code, so pleas also tell me things I can improve with the readability and understandability of the output. Generating these pages (without parallelization) takes a bit over 3 hours. So it would also be possible to update these pages in the update frequency of ftp.debian.org if so desired. cheers, josch -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org