[Piuparts-commits] rev 358 - in trunk: . debian
Holger Levsen
holger at alioth.debian.org
Sat Apr 18 14:53:41 UTC 2009
Author: holger
Date: 2009-04-18 14:53:41 +0000 (Sat, 18 Apr 2009)
New Revision: 358
Modified:
trunk/TODO
trunk/debian/changelog
trunk/piuparts-report.py
Log:
- include links to logfiles in source summary pages
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2009-04-18 10:46:35 UTC (rev 357)
+++ trunk/TODO 2009-04-18 14:53:41 UTC (rev 358)
@@ -4,9 +4,8 @@
for 0.36:
- report:
- - find_log() is not used atm
- refactor code, sources.txt should not be calculated where it currently is
- - include links to logfiles in source summary pages
+ - get rid of old log pages and put stats in the index page
- slave
- mention distro when sending logs
- then R
@@ -23,6 +22,12 @@
none of this kind left.
warn visibly in logfile (but without error) when testing a packages with
circular dependencies.
+- http://piuparts.debian.org/sid/state-failed-testing.html lists linux-image-2.6.29-1-amd64
+ four times :-(
+- http://piuparts.debian.org/sid/state-dependency-does-not-exist.html#addresses-goodies-for-gnustep
+ links to http://goldwasser.athome/source/a/addresses-for-gnustep (0.4.7-1).html
+ obviously doesnt exist.
+- bug or feature: udebs turn up as a state ;-) see http://piuparts.debian.org/source/u/udev.html
for 0.37:
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-04-18 10:46:35 UTC (rev 357)
+++ trunk/debian/changelog 2009-04-18 14:53:41 UTC (rev 358)
@@ -45,6 +45,7 @@
- generate sources.txt (per section) with a summary status per source
package (for the PTS to display a source packages piuparts state)
- generate html status pages for all source packages (to link from the PTS)
+ with links to state explaination and available logfiles.
- provide links to logfiles in statistics page.
- provide links to source packages pages from state pages and back, as well
as links to the dependencies state.
Modified: trunk/piuparts-report.py
===================================================================
--- trunk/piuparts-report.py 2009-04-18 10:46:35 UTC (rev 357)
+++ trunk/piuparts-report.py 2009-04-18 14:53:41 UTC (rev 358)
@@ -342,7 +342,7 @@
</tr>
<tr class="normalrow">
<td class="contentcell2">
- <b>2009-04-18</b>: Deleted all failed logfiles which complained about <p>/var/games</p> being present after purge, as this ain't an issue, see #524461.
+ <b>2009-04-18</b>: Deleted all failed logfiles which complained about <code>/var/games</code> being present after purge, as this ain't an issue, see #524461.
</td>
</tr>
<tr class="normalrow">
@@ -576,7 +576,7 @@
versions = []
for pathname, version in packages[package]:
version_count += 1
- versions.append("<a href='%s'>%s</a>" %
+ versions.append("<a href=\"%s\">%s</a>" %
(html_protect(pathname),
html_protect(version)))
line = "<li>%s %s</li>\n" % (html_protect(package),
@@ -610,6 +610,14 @@
title_by_dir[dir],
desc_by_dir[dir], list)
+ def find_links_to_logs(self, package_name, dirs, logs_by_dir):
+ links = []
+ for dir in dirs:
+ for basename in logs_by_dir[dir]:
+ if basename.startswith(package_name) and basename.endswith(".log"):
+ package, version = basename[:-len(".log")].split("_")
+ links.append("<a href=\"/%s\">%s</a>" % (os.path.join(self._config.section, dir, basename),html_protect(version)))
+ return links
def link_to_source_summary(self, package_name):
source_name=self._binary_db.get_source_package(package_name)
@@ -630,6 +638,22 @@
finally:
return link
+ def links_to_logs(self, package_name, state, logs_by_dir):
+ link = "N/A"
+ dirs = ""
+
+ if state == "successfully-tested":
+ dirs = ["pass", "fixed"]
+ elif state == "failed-testing":
+ dirs = ["fail", "bugged", "untestable"]
+
+ if dirs != "":
+ links = self.find_links_to_logs (package_name, dirs, logs_by_dir)
+ link = ", ".join(links)
+
+ return link
+
+
def write_counts_summary(self):
logging.debug("Writing counts.txt")
header = "date"
@@ -651,15 +675,7 @@
if not current_day in last_line:
append_file(countsfile, counts)
- def find_log(self, package):
- n = self._binary_db._logdb._log_name(package["Package"], package["Version"])
- for dirname in self._db._all:
- nn = os.path.join(dirname, n)
- if os.path.exists(nn):
- return nn
- return None
-
- def prepare_package_summaries(self):
+ def prepare_package_summaries(self, logs_by_dir):
logging.debug("Writing package templates in %s" % self._config.section)
sources = ""
@@ -670,7 +686,7 @@
os.makedirs(summary_page_path)
binaries = self._source_db.get_control_header(source, "Binary")
- version = self._source_db.get_control_header(source, "Version")
+ current_version = self._source_db.get_control_header(source, "Version")
maintainer = self._source_db.get_control_header(source, "Maintainer")
sourcerows = "<tr class=\"normalrow\"><td class=\"contentcell2\"><a href=\"http://packages.qa.debian.org/%s\" target=\"_blank\">%s</a></td><td class=\"contentcell2\" colspan=\"2\">%s</td></tr>" % (source, html_protect(source), html_protect(maintainer))
@@ -686,7 +702,7 @@
binaryrows = "<tr class=\"titlerow\"><td class=\"titlecell\" colspan=\"3\">Binary package(s) in "+self._config.section+"</td></tr>"
for binary in binaries.split(", "):
state = self._binary_db.state_by_name(binary)
- binaryrows += "<tr class=\"normalrow\"><td class=\"contentcell2\">%s</td><td class=\"contentcell2\">%s</td><td class=\"contentcell2\">%s</td></tr>" % (binary, self.link_to_state_page(self._config.section,binary,state), version)
+ binaryrows += "<tr class=\"normalrow\"><td class=\"contentcell2\">%s</td><td class=\"contentcell2\">%s: %s</td><td class=\"contentcell2\">current: %s</td></tr>" % (binary, self.link_to_state_page(self._config.section,binary,state), self.links_to_logs(binary, state, logs_by_dir), current_version)
if state != "successfully-tested":
success = False
if state == "failed-testing":
@@ -772,7 +788,7 @@
self.write_counts_summary()
if self._config["sources-url"]:
- self.prepare_package_summaries()
+ self.prepare_package_summaries(logs_by_dir)
def generate_output(self, master_directory, output_directory, section_names):
More information about the Piuparts-commits
mailing list