Bug#825002: sgml-base: broken super catalog after removing docutils-common
Control: clone -1 -2
Control: reassign -2 debhelper
Control: retitle -2 dh_installcatalogs: please activate sgml-base explicitly
Control: severity -2 wishlist
Control: block -2 by -1
Control: noowner -2
On Sun, May 22, 2016 at 12:27:32PM +0200, Helmut Grohne wrote:
> In dpkg 1.17.0, trigger processing was changed. Starting with that
> version, dpkg no longer activates triggers for conffiles on package
> removal (because conffiles are only removed during purge). Since that
> version the following sequence in a pristine sid chroot leaves a broken
> super catalog:
>
> apt-get install docutils-common
> apt-get remove docutils-common
>
> The latter invocation does not trigger sgml-base. Thus docutils-common
> remains in the super catalog and e.g. openjade fails.
>
> After discussion this with Guillem Jover, we concluded that this
> particular use of sgml-base was not intentional, so dpkg will not revert
> to the 1.16.10 behaviour.
>
> Guillem Jover suggested that sgml-base should provide a
> conffile-independent trigger (e.g. "update-catalog") and that packages
> providing catalogs should invoke it explicitly. Implementing this
> implies changing sgml-base, debhelper and reuploading 24 source
> packages shipping catalogs.
You can find the implementation for debhelper attached. It basically
consists of adding an autotrigger invocation and bumps the sgml-base
version.
In addition I am removing the transition script as it is now part of
both wheezy and jessie. Did we ever support skipping two releases?
This is a request for review and should not be included in debhelper
before the relevant sgml-base changes have been uploaded.
Helmut
diff --minimal -Nru debhelper-9.20160403/autoscripts/preinst-sgmlcatalog debhelper-9.20160403+nmu1/autoscripts/preinst-sgmlcatalog
--- debhelper-9.20160403/autoscripts/preinst-sgmlcatalog 2014-11-16 16:43:09.000000000 +0100
+++ debhelper-9.20160403+nmu1/autoscripts/preinst-sgmlcatalog 1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-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.
- mv #CENTRALCAT# #CENTRALCAT#.old
-fi
diff --minimal -Nru debhelper-9.20160403/debian/changelog debhelper-9.20160403+nmu1/debian/changelog
--- debhelper-9.20160403/debian/changelog 2016-04-03 10:56:12.000000000 +0200
+++ debhelper-9.20160403+nmu1/debian/changelog 2016-05-22 12:47:08.000000000 +0200
@@ -1,3 +1,13 @@
+debhelper (9.20160403+nmu1) UNRELEASED; urgency=medium
+
+ * Non-maintainer upload.
+ * dh_installcatalogs: Explicitly trigger update-catalog since
+ dpkg does not trigger conffiles on package removal.
+ * dh_installcatalogs: Drop autoscript for transition that completed in
+ wheezy.
+
+ -- Helmut Grohne <helmut@subdivi.de> Sun, 22 May 2016 12:35:27 +0200
+
debhelper (9.20160403) unstable; urgency=medium
* d/control: Requre dh-autoreconf (>= 12) to ensure
diff --minimal -Nru debhelper-9.20160403/dh_installcatalogs debhelper-9.20160403+nmu1/dh_installcatalogs
--- debhelper-9.20160403/dh_installcatalogs 2016-01-14 20:49:48.000000000 +0100
+++ debhelper-9.20160403+nmu1/dh_installcatalogs 2016-05-22 12:46:36.000000000 +0200
@@ -10,7 +10,7 @@
use warnings;
use Debian::Debhelper::Dh_Lib;
-my $sgmlbasever = "1.26+nmu2";
+my $sgmlbasever = "1.28";
=head1 SYNOPSIS
@@ -108,8 +108,7 @@
close CENTRALCAT;
if (! $dh{NOSCRIPTS}) {
- autoscript($package, "preinst", "preinst-sgmlcatalog",
- "s%#CENTRALCAT#%$centralcat%g;");
+ autotrigger($package, "activate", "update-catalog");
autoscript($package, "postrm", "postrm-sgmlcatalog",
"s%#CENTRALCAT#%$centralcat%g;");
}
Reply to: