[Piuparts-commits] rev 332 - in trunk: . debian piupartslib
Holger Levsen
holger at alioth.debian.org
Wed Apr 8 01:23:57 UTC 2009
Author: holger
Date: 2009-04-08 01:23:57 +0000 (Wed, 08 Apr 2009)
New Revision: 332
Modified:
trunk/README.txt
trunk/TODO
trunk/debian/changelog
trunk/piuparts-report.py
trunk/piuparts-slave.py
trunk/piupartslib/packagesdb.py
Log:
- introduce new setting "sources-url" for piuparts.conf.
- improve source summary pages (work in progress)
- bump Standards-Version to 3.8.1, no changes neccessary.
Modified: trunk/README.txt
===================================================================
--- trunk/README.txt 2009-04-07 17:09:23 UTC (rev 331)
+++ trunk/README.txt 2009-04-08 01:23:57 UTC (rev 332)
@@ -371,6 +371,8 @@
* "packages-url" is a URL to the Packages.bz2 file for your mirror. It is usually best to use the Packages.bz2 for sid (unstable), unless you know what you're doing. For example, you might use 'http://ftp.debian.org/debian/dists/sid/main/binary-i386/Packages.bz2' but you really do want to replace "ftp.debian.org" with the name of your local mirror.
+* "sources-url" is a URL to the Sources.bz2 file for your mirror. "sources-url" must match "packages-url", if it is not defined, piuparts-reports will not generate source centric html pages.
+
* "mirror" tells the slave which mirror it is to use. The slave gives this to piuparts when it runs it.
* "piuparts-cmd" is the command the slave uses to start piuparts. It should include 'sudo' if necessary so that piuparts runs with sufficient priviledges to do its testing (and that means root priviledges).
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2009-04-07 17:09:23 UTC (rev 331)
+++ trunk/TODO 2009-04-08 01:23:57 UTC (rev 332)
@@ -4,16 +4,16 @@
must for 0.36
- report:
---- dont do source stats if source-url not defined, document that in readme.txt
+--- write_sources_summaries() should be split in prepare_ and assemble_. assemble_ should use find_log() to build all needed pages
--- find_log() is not used atm
+--- $package in $section
+--- include pts links
--- include links to logfiles in source summary pages
--- include links to http://qa.debian.org/developer.php?login=$maintainer_email
---- document sources-url in README.txt
- then R
- dont write counts.txt if it has already been written that day
- take care of old conf files on upgrades
- take care of old pyc files from python-central
-- rewrite manpage in asciidoc and get rid of some build-depends. also dont build readme.pdf
- test pipuparts with piuparts before uploading
for 0.37 and on
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-04-07 17:09:23 UTC (rev 331)
+++ trunk/debian/changelog 2009-04-08 01:23:57 UTC (rev 332)
@@ -40,7 +40,8 @@
- generate counts.txt (per section) with raw numbers of packages per state,
include these stats in the debug output (so it gets included in the mails
send by cron.)
- - generate sources.txt (per section) with a summary status per source
+ - introduce new setting "sources-url" for piuparts.conf.
+ - 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)
* Break backwards compatibility of the configuration files for master-slave-
@@ -58,7 +59,8 @@
- add build-dependencies on debhelper, asciidoc and xmlto.
- remove build-dependencies on docbook2x and docbook-xml.
- set Homepage: to http://piuparts.debian.org
- * Rewrite debian/rules using debhelper.
+ - bump Standards-Version to 3.8.1, no changes neccessary.
+ * Rewrite debian/rules from scratch using debhelper.
* Merge README, how-to-use-piuparts.txt and custom-scripts.txt into
README.txt, convert it to asciidoc and build pdf and html versions of it.
* Restructure and update README.txt to reflect the configuration changes in
@@ -69,7 +71,6 @@
* Update debian/copyright to reflect that piuparts is licenced under GPL2+.
* Update FSF address in all files referencing the GPL.
* Remove unused file piuparts.css.
- * Bump Standards-Version to 3.8.1, no changes neccessary.
-- Holger Levsen <holger at debian.org> Tue, 10 Mar 2009 15:23:59 +0100
Modified: trunk/piuparts-report.py
===================================================================
--- trunk/piuparts-report.py 2009-04-07 17:09:23 UTC (rev 331)
+++ trunk/piuparts-report.py 2009-04-08 01:23:57 UTC (rev 332)
@@ -517,11 +517,12 @@
self._binary_db.read_packages_file(packages_file)
packages_file.close()
- logging.info("Fetching %s" % self._config["sources-url"])
- sources_file = piupartslib.open_packages_url(self._config["sources-url"])
- self._source_db = piupartslib.packagesdb.PackagesDB()
- self._source_db.read_packages_file(sources_file)
- sources_file.close()
+ if self._config["sources-url"]:
+ logging.info("Fetching %s" % self._config["sources-url"])
+ sources_file = piupartslib.open_packages_url(self._config["sources-url"])
+ self._source_db = piupartslib.packagesdb.PackagesDB()
+ self._source_db.read_packages_file(sources_file)
+ sources_file.close()
def write_log_list_page(self, filename, title, preface, logs):
packages = {}
@@ -665,7 +666,9 @@
logging.debug("Writing source package summaries")
sources = ""
for source in self._source_db.get_all_packages():
- binaries = self._source_db.get_binary_package_names(source)
+ binaries = self._source_db.get_control_header(source, "Binary")
+ maintainer = self._source_db.get_control_header(source, "Maintainer")
+ version = self._source_db.get_control_header(source, "Version")
success = True
failed = False
binaryrows = ""
@@ -689,7 +692,7 @@
f.write(htmlpage.safe_substitute( {
"section_navigation": create_section_navigation(self._section_names),
"time": time.strftime("%Y-%m-%d %H:%M %Z"),
- "source": html_protect(source),
+ "source": html_protect(source+", "+maintainer+", "+version),
"section": html_protect(self._config.section),
"binaryrows": binaryrows,
}))
@@ -698,7 +701,8 @@
def generate_file_output(self):
self.write_counts_summary()
- self.write_sources_summaries()
+ if self._config["sources-url"]:
+ self.write_sources_summaries()
def generate_output(self, master_directory, output_directory, section_names):
self._section_names = section_names
Modified: trunk/piuparts-slave.py
===================================================================
--- trunk/piuparts-slave.py 2009-04-07 17:09:23 UTC (rev 331)
+++ trunk/piuparts-slave.py 2009-04-08 01:23:57 UTC (rev 332)
@@ -324,7 +324,7 @@
def test_package(config, package, packages_files):
- logging.info("Testing package %(Package)s %(Version)s" % package)
+ logging.info("Testing package %s/%s %s" % (config.section, package["Package"], package["Version"]))
output_name = log_name(package["Package"], package["Version"])
logging.debug("Opening log file %s" % output_name)
Modified: trunk/piupartslib/packagesdb.py
===================================================================
--- trunk/piupartslib/packagesdb.py 2009-04-07 17:09:23 UTC (rev 331)
+++ trunk/piupartslib/packagesdb.py 2009-04-08 01:23:57 UTC (rev 332)
@@ -376,8 +376,8 @@
self._find_all_packages()
return self._packages
- def get_binary_package_names(self, packagename):
- return self._packages[packagename]["Binary"]
+ def get_control_header(self, packagename, header):
+ return self._packages[packagename][header]
def get_package_state(self, package_name):
return self._package_state[packagename]
More information about the Piuparts-commits
mailing list