Package: ttf-staypuft
Version: 0.04-6
Severity: wishlist
Tags: patch
User: [email protected]
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 fonts-f500.
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'd no longer need to have handwritten maintainer scripts at
all.  Here's a patch:

  * 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.

diff -Nru ttf-staypuft-0.04/debian/control ttf-staypuft-0.04/debian/control
--- ttf-staypuft-0.04/debian/control    2011-07-22 22:49:49.000000000 +0100
+++ ttf-staypuft-0.04/debian/control    2012-02-13 13:28:28.000000000 +0000
@@ -2,12 +2,13 @@
 Section: fonts
 Priority: optional
 Maintainer: Edgar Antonio Palma de la Cruz <[email protected]>
-Build-Depends: debhelper (>= 8.0.0), fontforge, fontconfig
+Build-Depends: debhelper (>= 8.1.0~), fontforge, fontconfig
 Standards-Version: 3.9.2
 Homepage: http://www.thibault.org/fonts/staypuft/
 
 Package: ttf-staypuft
 Architecture: all
+Pre-Depends: ${misc:Pre-Depends}
 Depends: ${misc:Depends}, fontconfig
 Description: Stay-Puft free TrueType font
  Stay-Puft is a font developed freehand, with minimal splines. It's all
diff -Nru ttf-staypuft-0.04/debian/maintscript 
ttf-staypuft-0.04/debian/maintscript
--- ttf-staypuft-0.04/debian/maintscript        1970-01-01 01:00:00.000000000 
+0100
+++ ttf-staypuft-0.04/debian/maintscript        2012-02-13 13:28:00.000000000 
+0000
@@ -0,0 +1 @@
+rm_conffile /etc/defoma/hints/ttf-staypuft.hints 0.0.4-6
diff -Nru ttf-staypuft-0.04/debian/postinst ttf-staypuft-0.04/debian/postinst
--- ttf-staypuft-0.04/debian/postinst   2011-07-23 20:24:23.000000000 +0100
+++ ttf-staypuft-0.04/debian/postinst   1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +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-staypuft.hints 
0.0.4-6 -- "$@"
-fi
-
-#DEBHELPER#
diff -Nru ttf-staypuft-0.04/debian/postrm ttf-staypuft-0.04/debian/postrm
--- ttf-staypuft-0.04/debian/postrm     2011-07-23 21:42:11.000000000 +0100
+++ ttf-staypuft-0.04/debian/postrm     1970-01-01 01:00:00.000000000 +0100
@@ -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-staypuft.hints 
0.0.4-6 -- "$@"
-fi
-
-#DEBHELPER#
-
diff -Nru ttf-staypuft-0.04/debian/preinst ttf-staypuft-0.04/debian/preinst
--- ttf-staypuft-0.04/debian/preinst    2011-07-23 20:25:20.000000000 +0100
+++ ttf-staypuft-0.04/debian/preinst    1970-01-01 01:00:00.000000000 +0100
@@ -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-staypuft.hints 
0.0.4-6 -- "$@"
-fi
-
-#DEBHELPER#
-

Thanks,

-- 
Colin Watson                                       [[email protected]]



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to