[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.49-127-gd1ef233
Andreas Beckmann
anbe at debian.org
Sun Mar 3 16:11:22 UTC 2013
The following commit has been merged in the develop branch:
commit c66c5d4b35da7461a139af6a053524779603019b
Author: Andreas Beckmann <anbe at debian.org>
Date: Sun Mar 3 16:30:09 2013 +0100
p-r: generate default descriptions
two different descriptions depending on the test: install/purge or
distupgrade
the description setting in piuparts.conf can be omitted to use the
default description
if the description setting in piuparts.conf starts/ends with a '+',
it will be appended/prepended to the default description
Signed-off-by: Andreas Beckmann <anbe at debian.org>
diff --git a/README.txt b/README.txt
index 0bf0f6e..8fdff3f 100644
--- a/README.txt
+++ b/README.txt
@@ -559,6 +559,11 @@ section, too, and will serve as defaults for all other sections
directory for leftover mountpoints and chroots only evaluate the
[global] setting.
+* "description" is a synopsis of the test used in the report. A
+ default description will be generated if this is not set or will
+ be prepended (appended) if the description starts (ends) with
+ '+'.
+
* "mirror" tells the slave which mirror it is to use. The slave
gives this to piuparts when it runs it. The URLs for Packages and
Sources files will be generated from this setting, too. Default
diff --git a/debian/changelog b/debian/changelog
index 553eac9..4658851 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -56,6 +56,7 @@ piuparts (0.50) UNRELEASED; urgency=low
- Call r.dev_off() after generating a plot. (Closes: #657799)
- Use piuparts.conf global proxy setting as http_proxy.
- Use distros.conf to compute URLs.
+ - Generate/prepend/append a default description.
* Makefile:
- Add DESTDIR support.
- Overhaul. Add dependencies between build and install targets.
diff --git a/piuparts-report.py b/piuparts-report.py
index b54b645..bc88230 100644
--- a/piuparts-report.py
+++ b/piuparts-report.py
@@ -1139,12 +1139,32 @@ class Section:
htmlpage = string.Template(HTML_HEADER + SECTION_INDEX_BODY_TEMPLATE + HTML_FOOTER)
packages_url = self._distro_config.get_packages_url(
self._config.get_distro(), self._config.get_area(), self._config.get_arch())
+ vendor = "Debian"
+ if len(self._config.get_distros()) > 1:
+ description = "%s %s: package installation in %s" % (
+ vendor,
+ self._config.get_area(),
+ self._config.get_start_distro())
+ for distro in self._config.get_distros()[1:]:
+ description += ", dist-upgrade to %s" % distro
+ description += ", removal, and purge test."
+ else:
+ description = "%s %s / %s: package installation, removal, and purge test." % (
+ vendor,
+ self._config.get_distro(),
+ self._config.get_area())
+ if self._config["description"].startswith("+"):
+ description = description + " " + self._config["description"][1:]
+ elif self._config["description"].endswith("+"):
+ description = self._config["description"][:-1] + " " + description
+ elif self._config["description"]:
+ description = self._config["description"]
write_file(os.path.join(self._output_directory, "index.html"), htmlpage.safe_substitute( {
"page_title": html_protect(self._config.section+" statistics"),
"section_navigation": create_section_navigation(self._section_names,self._config.section,self._doc_root),
"time": time.strftime("%Y-%m-%d %H:%M %Z"),
"section": html_protect(self._config.section),
- "description": html_protect(self._config["description"]),
+ "description": html_protect(description),
"tablerows": tablerows,
"packagesurl": html_protect(packages_url),
"doc_root": self._doc_root,
--
piuparts git repository
More information about the Piuparts-commits
mailing list