[debhelper-devel] [debhelper] 02/05: Revert "dh_installcatalogs: Explicitly activate sgml-base trigger"

Niels Thykier nthykier at moszumanska.debian.org
Sat Oct 15 08:53:08 UTC 2016


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch jessie-backports
in repository debhelper.

commit 196b5f3bd2146c2e9804cfaedfd84bf95c0940a6
Author: Niels Thykier <niels at thykier.net>
Date:   Mon Jun 20 18:02:32 2016 +0000

    Revert "dh_installcatalogs: Explicitly activate sgml-base trigger"
    
    This change is not ready for backports - requires newer version of
    sgml-base.
    
    This reverts commit e816fbea88d2387ef078c3ac116db816d1efe6f5.
---
 autoscripts/preinst-sgmlcatalog |  8 ++++++++
 dh_installcatalogs              | 15 +++++++--------
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/autoscripts/preinst-sgmlcatalog b/autoscripts/preinst-sgmlcatalog
new file mode 100644
index 0000000..96f0673
--- /dev/null
+++ b/autoscripts/preinst-sgmlcatalog
@@ -0,0 +1,8 @@
+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 --git a/dh_installcatalogs b/dh_installcatalogs
index bb45db9..d33ad9e 100755
--- a/dh_installcatalogs
+++ b/dh_installcatalogs
@@ -10,7 +10,7 @@ use strict;
 use warnings;
 use Debian::Debhelper::Dh_Lib;
 
-my $sgmlbasever = "1.28";
+my $sgmlbasever = "1.26+nmu2";
 
 =head1 SYNOPSIS
 
@@ -26,10 +26,9 @@ F</etc/sgml/I<package>.cat>.
 
 This command automatically adds maintainer script snippets for
 registering and unregistering the catalogs and supercatalogs (unless
-B<-n> is used). These snippets are inserted into the maintainer
-scripts and the B<triggers> file by B<dh_installdeb>; see
-L<dh_installdeb(1)> for an explanation of Debhelper maintainer script
-snippets.
+B<-n> is used). These snippets are inserted into the maintainer scripts
+by B<dh_installdeb>; see L<dh_installdeb(1)> for an explanation of
+Debhelper maintainer script snippets.
 
 A dependency on B<sgml-base> will be added to B<${misc:Depends}>, so be
 sure your package uses that variable in F<debian/control>.
@@ -54,8 +53,7 @@ start with F</usr/share/sgml/>.
 
 =item B<-n>, B<--noscripts>
 
-Do not modify F<postinst>/F<postrm>/F<prerm> scripts nor add an
-activation trigger.
+Do not modify F<postinst>/F<postrm>/F<prerm> scripts.
 
 =back
 
@@ -110,7 +108,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 		close CENTRALCAT;
 
 		if (! $dh{NOSCRIPTS}) {
-			autotrigger($package, "activate", "update-sgmlcatalog");
+			autoscript($package, "preinst", "preinst-sgmlcatalog",
+				   "s%#CENTRALCAT#%$centralcat%g;");
 			autoscript($package, "postrm", "postrm-sgmlcatalog",
 				   "s%#CENTRALCAT#%$centralcat%g;");
 		}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list