[Piuparts-commits] rev 424 - in trunk: . debian
Holger Levsen
holger at alioth.debian.org
Fri May 29 22:50:17 UTC 2009
Author: holger
Date: 2009-05-29 22:50:17 +0000 (Fri, 29 May 2009)
New Revision: 424
Added:
trunk/debian/preinst
Modified:
trunk/TODO
trunk/debian/changelog
trunk/debian/control
Log:
- take care of old conf files on upgrades
- dependency gs has been renamed to ghostcript
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2009-05-29 21:25:03 UTC (rev 423)
+++ trunk/TODO 2009-05-29 22:50:17 UTC (rev 424)
@@ -7,10 +7,6 @@
- PackagesDB: get rid of 50% of unique() :)
-- take care of old conf files on upgrades
- /etc/piuparts/piuparts-master.conf
- /etc/piuparts/piuparts-slave.conf
-
once 0.36 is released:
- integration with packages.qa.debian.org
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-05-29 21:25:03 UTC (rev 423)
+++ trunk/debian/changelog 2009-05-29 22:50:17 UTC (rev 424)
@@ -1,5 +1,9 @@
piuparts (0.36) UNRELEASED; urgency=low
+ * Break backwards compatibility of the configuration files for master-slave-
+ mode. Merge those three into one: /etc/piuparts/piuparts/piuparts.conf.
+ Introduce a new global section in piuparts.conf which is shared among the
+ other sections there.
* piuparts.py:
- add check whether scriptsdir exits, to fail gracefully if not.
- copy scriptsdir to chroot also when doing upgrade tests.
@@ -38,7 +42,7 @@
* piuparts-master.py: remove code to write statistics, that is done only in
piuparts-report.py now.
* piuparts-slave.py:
- - support looping trough multiple sections in slave.conf via new config
+ - support looping trough multiple sections in piuparts.conf via new config
value "sections". Thanks to Frank Ploss for writing this patch with me
and helping me understand the code much better!
- allow the user to stop the slave with control-C.
@@ -47,7 +51,7 @@
without changelog entry.
* piuparts-report.py:
- support sections in configuration file.
- - support looping trough multiple sections in report.conf via new config
+ - support looping trough multiple sections in piuparts.conf via new config
value "sections".
- 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
@@ -71,10 +75,6 @@
- include index.tpl (if it exists) from output-directory into the
generated index page, so one can add news to the index page without
editing piuparts-report.py.
- * Break backwards compatibility of the configuration files for master-slave-
- mode. Merge those three into one: /etc/piuparts/piuparts/piuparts.conf.
- Introduce a new global section in piuparts.conf which is shared among the
- other sections there.
* Always use alphabetic time zone abbreviation in timestamps.
* Makefile:
- add "~$date" to versionstring if building an unreleased version, thus
@@ -82,8 +82,9 @@
- split install target into install-doc, install-conf and install, to aid
development and deployment from trunk.
* debian/control:
- - depend on python (>>2.4), make dependency to python-debian unversioned
+ - depend on python (>>2.4), make dependency to python-debian unversioned.
- add build-dependencies on debhelper, asciidoc and xmlto.
+ - dependency gs has been renamed to ghostcript
- remove build-dependencies on docbook2x and docbook-xml.
- suggest python-rpy and gs to improve piuparts-report output.
- set Homepage: to http://piuparts.debian.org
Modified: trunk/debian/control
===================================================================
--- trunk/debian/control 2009-05-29 21:25:03 UTC (rev 423)
+++ trunk/debian/control 2009-05-29 22:50:17 UTC (rev 424)
@@ -20,7 +20,7 @@
Architecture: all
Depends: apt, python (>> 2.4), debootstrap (>= 0.3.3), lsof, lsb-release,
python-debian
-Suggests: python-rpy, gs
+Suggests: python-rpy, ghostscript
Description: .deb package installation, upgrading, and removal testing tool
piuparts tests that .deb packages (as used by Debian) handle
installation, upgrading, and removal correctly. It does this by
Added: trunk/debian/preinst
===================================================================
--- trunk/debian/preinst (rev 0)
+++ trunk/debian/preinst 2009-05-29 22:50:17 UTC (rev 424)
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -e
+
+# copied and paste from http://www.dpkg.org/dpkg/ConffileHandling - thanks!
+
+# Remove a no-longer used conffile
+rm_conffile() {
+ CONFFILE="$1"
+
+ if [ -e "$CONFFILE" ]; then
+ md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
+ old_md5sum="`sed -n -e \"/^Conffiles:/,/^[^ ]/{\\\\' $CONFFILE'{s/.* //;p}}\" /var/lib/dpkg/status`"
+ if [ "$md5sum" != "$old_md5sum" ]; then
+ echo "Obsolete conffile $CONFFILE has been modified by you."
+ echo "Saving as $CONFFILE.dpkg-bak ..."
+ mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
+ else
+ echo "Removing obsolete conffile $CONFFILE ..."
+ rm -f "$CONFFILE"
+ fi
+ fi
+}
+
+case "$1" in
+install|upgrade)
+ if dpkg --compare-versions "$2" le "0.35"; then
+ rm_conffile "/etc/piuparts/piuparts-master.conf"
+ rm_conffile "/etc/piuparts/piuparts-slave.conf"
+ fi
+esac
+
+#DEBHELPER#
More information about the Piuparts-commits
mailing list