Package: ttf-unifont
Version: 1:5.1.20080914-1.1
Severity: wishlist
Tags: patch
User: ubuntu-de...@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 ttf-unifont.
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.

reverted:
--- unifont-5.1.20080914/debian/ttf-unifont.preinst
+++ unifont-5.1.20080914.orig/debian/ttf-unifont.preinst
@@ -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-unifont.hints 
1:5.1.20080914-1 -- "$@"
-fi
-
-#DEBHELPER#
-
reverted:
--- unifont-5.1.20080914/debian/ttf-unifont.postinst
+++ unifont-5.1.20080914.orig/debian/ttf-unifont.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-unifont.hints 
1:5.1.20080914-1 -- "$@"
-fi
-
-#DEBHELPER#
-
diff -u unifont-5.1.20080914/debian/control unifont-5.1.20080914/debian/control
--- unifont-5.1.20080914/debian/control
+++ unifont-5.1.20080914/debian/control
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Paul Hardy <unifoun...@unifoundry.com>
 Uploaders: Anthony Fok <f...@debian.org>
-Build-Depends: debhelper (>= 5.0.31)
+Build-Depends: debhelper (>= 8.1.0~)
 Standards-Version: 3.8.0
 Homepage: http://unifoundry.com
 
@@ -52,6 +52,7 @@
 
 Package: ttf-unifont
 Architecture: all
+Pre-Depends: ${misc:Pre-Depends}
 Description: TrueType version of the GNU Unifont
  This is a bitmap font converted into a scalable TrueType outline
  font.  Each pixel in the original bitmap font is represented as
reverted:
--- unifont-5.1.20080914/debian/ttf-unifont.postrm
+++ unifont-5.1.20080914.orig/debian/ttf-unifont.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-unifont.hints 
1:5.1.20080914-1 -- "$@"
-fi
-
-#DEBHELPER#
-
only in patch2:
unchanged:
--- unifont-5.1.20080914.orig/debian/ttf-unifont.maintscript
+++ unifont-5.1.20080914/debian/ttf-unifont.maintscript
@@ -0,0 +1 @@
+rm_conffile /etc/defoma/hints/ttf-unifont.hints 1:5.1.20080914-1

Thanks,

-- 
Colin Watson                                       [cjwat...@ubuntu.com]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to