Bug#659746: tex-gyre: use dh_installdeb maintscript support
Package: tex-gyre
Version: 2.004.1-2.1
Severity: wishlist
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch precise
Using 'dpkg-maintscript-helper supports rm_conffile' guards introduces
unreliability into upgrades; it means that the conffile is removed or
not depending on whether dpkg happens to be unpacked before tex-gyre.
This seems generally undesirable; it would be better to enforce a single
code path. (This is academic for Debian because the version of dpkg in
squeeze supported dpkg-maintscript-helper, hence Severity: wishlist;
Ubuntu's last LTS release didn't have a sufficient version of dpkg for
that which is why I care.)
It would be nice to just use dh_installdeb's support for generating
dpkg-maintscript-helper commands, which was introduced in debhelper
8.1.0. This would remove duplicate code from your maintainer scripts -
in fact, you could remove some of your handwritten maintainer scripts
entirely. Here's a patch. Note that I also corrected the previous
NMUer's misunderstanding of the version parameter to
dpkg-maintscript-helper.
* Use maintscript support in dh_installdeb rather than writing out
dpkg-maintscript-helper commands by hand. We now simply Pre-Depend on a
new enough version of dpkg rather than using 'dpkg-maintscript-helper
supports' guards, leading to more predictable behaviour on upgrades.
reverted:
--- tex-gyre-2.004.1/debian/postrm
+++ tex-gyre-2.004.1.orig/debian/postrm
@@ -1,9 +0,0 @@
-#! /bin/sh
-
-set -e
-
-if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
- dpkg-maintscript-helper rm_conffile /etc/defoma/hints/ttf-gyre.hints 2.004.1-3 -- "$@"
-fi
-
-#DEBHELPER#
diff -u tex-gyre-2.004.1/debian/control tex-gyre-2.004.1/debian/control
--- tex-gyre-2.004.1/debian/control
+++ tex-gyre-2.004.1/debian/control
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Debian TeX maintainers <debian-tex-maint@lists.debian.org>
Uploaders: Norbert Preining <preining@debian.org>
-Build-Depends: debhelper (>= 5.0.35)
+Build-Depends: debhelper (>= 8.1.0~)
Build-Depends-Indep: tex-common (>= 1.18)
Standards-Version: 3.8.3
Vcs-Svn: svn://svn.debian.org/svn/debian-tex/tex-gyre/trunk
@@ -13,6 +13,7 @@
Package: tex-gyre
Section: tex
Architecture: all
+Pre-Depends: ${misc:Pre-Depends}
Depends: ${misc:Depends}
Description: scalable PostScript and OpenType fonts based on URW Fonts
The TeX Gyre project, following the Latin Modern project, aims at providing
diff -u tex-gyre-2.004.1/debian/preinst tex-gyre-2.004.1/debian/preinst
--- tex-gyre-2.004.1/debian/preinst
+++ tex-gyre-2.004.1/debian/preinst
@@ -10,7 +10,2 @@
-
-if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
- dpkg-maintscript-helper rm_conffile /etc/defoma/hints/ttf-gyre.hints 2.004.1-3 -- "$@"
-fi
-
#DEBHELPER#
reverted:
--- tex-gyre-2.004.1/debian/postinst
+++ tex-gyre-2.004.1.orig/debian/postinst
@@ -1,9 +0,0 @@
-#! /bin/sh
-
-set -e
-
-if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
- dpkg-maintscript-helper rm_conffile /etc/defoma/hints/ttf-gyre.hints 2.004.1-3 -- "$@"
-fi
-
-#DEBHELPER#
only in patch2:
unchanged:
--- tex-gyre-2.004.1.orig/debian/maintscript
+++ tex-gyre-2.004.1/debian/maintscript
@@ -0,0 +1 @@
+rm_conffile /etc/defoma/hints/ttf-gyre.hints 2.004.1-2
Thanks,
--
Colin Watson [cjwatson@ubuntu.com]
Reply to: