[Piuparts-commits] rev 656 - trunk
Holger Levsen
holger at alioth.debian.org
Sat Feb 27 01:37:35 UTC 2010
Author: holger
Date: 2010-02-27 01:37:35 +0000 (Sat, 27 Feb 2010)
New Revision: 656
Modified:
trunk/TODO
trunk/piuparts-report.py
Log:
improve view on analysises on section overview page
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2010-02-27 00:06:31 UTC (rev 655)
+++ trunk/TODO 2010-02-27 01:37:35 UTC (rev 656)
@@ -41,20 +41,12 @@
aint helpful neither.
- report:
+ - write stats page for failed+bugged maintainers and uploaders, as a hall of shame list ;)
- write stats about the reasons for failures:
- installation hangs and uses all cpu when installing with
DEBIAN_FRONTEND="noninteractive"
- - owned and unowned files after purge (policy 6.8 + 10.7.3)
- - files owned by two or more packages are not removed by dpkg, these should be ignored.
- eg, "/etc/php5 owned by: php5-cgi, php5-common" from http://piuparts.debian.org/squeeze/fail/php5-cgi_5.2.6.dfsg.1-3.log
- - prompts without using debconf (#206684 is pending, will be in policy 3.8.2)
- - left-over processes (10.7.3)
- "E: Broken packages" - often indicates a problem with the archive at the
time of testing, not with the package being tested
- - "/var/lib/dpkg/info/.*.postinst: .* command not found" - missing depends
- - "/var/lib/dpkg/info/.*.postrm: .* command not found" - missing depends or
- using non-essential packages in purge
- - unclassified
- include bugged status for packages on http://piuparts.debian.org/sid/state-failed-testing.html
- RSS feeds of logs
- include pts state (as an icon) in source summary pages
Modified: trunk/piuparts-report.py
===================================================================
--- trunk/piuparts-report.py 2010-02-27 00:06:31 UTC (rev 655)
+++ trunk/piuparts-report.py 2010-02-27 01:37:35 UTC (rev 656)
@@ -877,46 +877,51 @@
def create_and_link_to_analysises(self,state):
link="<ul>"
- templates = sorted(find_files_with_suffix(self._output_directory,".tpl"))
- for template in templates:
+ for template, linktarget in linktarget_by_template.iteritems():
if (state == "failed-testing" and template[-9:] != "issue.tpl") or (state == "successfully-tested" and template[-9:] == "issue.tpl"):
+ substats = ""
tpl = os.path.join(self._output_directory, template)
- f = file(tpl, "r")
- rows = file.read(f)
- f.close()
- os.unlink(tpl)
+ try:
+ f = file(tpl, "r")
+ rows = file.read(f)
+ f.close()
+ os.unlink(tpl)
- htmlpage = string.Template(HTML_HEADER + ANALYSIS_BODY_TEMPLATE + HTML_FOOTER)
- filename = os.path.join(self._output_directory, template[:-len(".tpl")]+".html")
- f = file(filename, "w")
- f.write(htmlpage.safe_substitute( {
- "page_title": html_protect("Packages in state "+state+" "+linktarget_by_template[template]),
- "section_navigation": create_section_navigation(self._section_names,self._config.section),
- "time": time.strftime("%Y-%m-%d %H:%M %Z"),
- "rows": rows,
- }))
- f.close()
- substats = ""
- if state == "failed-testing":
- count_bugged = string.count(rows,"/bugged/")
- count_failed = string.count(rows,"/fail/")
- if count_bugged != 0 or count_failed != 0:
- substats = ": "
- if count_bugged != 0:
- substats += "%s bugged" % count_bugged
- if count_bugged != 0 and count_failed != 0:
- substats += ", "
- if count_failed != 0:
- substats += "<span id=\"needs-bugging\">%s failed</span>" % count_failed
- else:
- substats += "%s passed" % string.count(rows,"/pass/")
- link += "<li><a href=%s>%s</a>%s</li>" % (
+ htmlpage = string.Template(HTML_HEADER + ANALYSIS_BODY_TEMPLATE + HTML_FOOTER)
+ filename = os.path.join(self._output_directory, template[:-len(".tpl")]+".html")
+ f = file(filename, "w")
+ f.write(htmlpage.safe_substitute( {
+ "page_title": html_protect("Packages in state "+state+" "+linktarget),
+ "section_navigation": create_section_navigation(self._section_names,self._config.section),
+ "time": time.strftime("%Y-%m-%d %H:%M %Z"),
+ "rows": rows,
+ }))
+ f.close()
+ if state == "failed-testing":
+ count_bugged = string.count(rows,"/bugged/")
+ count_failed = string.count(rows,"/fail/")
+ if count_bugged > 0 or count_failed > 0:
+ substats = ": "
+ if count_bugged > 0:
+ substats += "%s bugged" % count_bugged
+ if count_bugged > 0 and count_failed > 0:
+ substats += ", "
+ if count_failed > 0:
+ substats += "<span id=\"needs-bugging\">%s failed</span>" % count_failed
+ else:
+ count_passed = string.count(rows,"/pass/")
+ if count_passed > 0:
+ substats += ": %s passed" % count_passed
+ link += "<li><a href=%s>%s</a>%s</li>" % (
template[:-len(".tpl")]+".html",
- linktarget_by_template[template],
+ linktarget,
substats
- )
- link += "</ul>"
+ )
+ except:
+ logging.debug("analysis template %s does not exist." % template)
+
+ link += "</ul>"
return link
def write_section_index_page(self,dirs,total_packages):
More information about the Piuparts-commits
mailing list