Control: tags 681194 + patch
On Wed, Jul 11, 2012 at 11:59:16AM +0200, Andreas Beckmann wrote:
> The preinst contains
> if [ "$1" = "upgrade" ] && ! dpkg-query -S /etc/sgml/jade.cat >/dev/null
> 2>&1; then
> which handles regular upgrades, but the preinst will be called
> <new-preinst> install <old-version>
> if the package is in "configuration files only" state
> http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html#s-unpackphase
I attached the patch as discussion on IRC with Andreas Beckmann. I did
some basic tests on the patch, but maybe some automated testing using
piuparts would be helpful here. Specifically I built a patched
debhelper, built an example package (xml-core) using the patched
debhelper and tried xml-core upgrades from purged -> new version,
removed squeeze package -> new version, installed squeeze package -> new
version. In no case there was a conffile prompt.
There is still no response from the release team on whether they can
start this transition for wheezy. As the freeze progresses chances seem
to diminish.
Helmut
diff -Nru debhelper-9.20120608/autoscripts/preinst-sgmlcatalog
debhelper-9.20120608+nmu1/autoscripts/preinst-sgmlcatalog
--- debhelper-9.20120608/autoscripts/preinst-sgmlcatalog 2012-05-28
19:37:23.000000000 +0200
+++ debhelper-9.20120608+nmu1/autoscripts/preinst-sgmlcatalog 2012-08-02
22:27:20.000000000 +0200
@@ -1,7 +1,8 @@
-if [ "$1" = "upgrade" ] && ! dpkg-query -S #CENTRALCAT# >/dev/null 2>&1; then
+if test -f #CENTRALCAT# -a "(" "$1" = "upgrade" -o "$1" = "install" -a -n "$2"
")" &&
+ ! dpkg-query -S #CENTRALCAT# >/dev/null 2>&1; then
# If the dpkg-query command returns non-zero, the central catalog is
# not owned by any package. This is due to an old behaviour of
# debhelper. Now that file becomes a conffile. In order to avoid a
# question during installation, we remove the old non-conffile.
- rm -f #CENTRALCAT#
+ mv #CENTRALCAT# #CENTRALCAT#.old
fi
diff -Nru debhelper-9.20120608/debian/changelog
debhelper-9.20120608+nmu1/debian/changelog
--- debhelper-9.20120608/debian/changelog 2012-06-08 19:15:58.000000000
+0200
+++ debhelper-9.20120608+nmu1/debian/changelog 2012-08-02 22:58:07.000000000
+0200
@@ -1,3 +1,11 @@
+debhelper (9.20120608+nmu1) unstable; urgency=low
+
+ * Non-maintainer upload.
+ * Also remove old sgml catalogs when rc -> ii. Closes: #681194
+ * Preserve old sgml catalogs as .old files to a void data loss.
+
+ -- Helmut Grohne <[email protected]> Thu, 02 Aug 2012 21:55:41 +0200
+
debhelper (9.20120608) unstable; urgency=low
* dh: When there's an -indep override target without -arch, or vice versa,