Package: ttf-radisnoir
Version: 0.9b-2
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-radisnoir.  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-radisnoir-0.9b/debian/control ttf-radisnoir-0.9b/debian/control
--- ttf-radisnoir-0.9b/debian/control   2011-07-20 21:58:45.000000000 +0100
+++ ttf-radisnoir-0.9b/debian/control   2012-02-13 13:17:24.000000000 +0000
@@ -3,12 +3,13 @@
 Priority: optional
 Maintainer: Gürkan Sengün <gur...@phys.ethz.ch>
 Uploaders: Debian Fonts Task Force <pkg-fonts-de...@lists.alioth.debian.org>
-Build-Depends: debhelper (>= 7), fontforge
+Build-Depends: debhelper (>= 8.1.0~), fontforge
 Standards-Version: 3.9.2
 Homepage: http://www.radisnoir.net/
 
 Package: ttf-radisnoir
 Architecture: all
+Pre-Depends: ${misc:Pre-Depends}
 Depends: ${misc:Depends}
 Description: Font inspired by Universal de Bayer and Bauhaus
  This is a sans serif font based on a regular circle and
diff -Nru ttf-radisnoir-0.9b/debian/maintscript 
ttf-radisnoir-0.9b/debian/maintscript
--- ttf-radisnoir-0.9b/debian/maintscript       1970-01-01 01:00:00.000000000 
+0100
+++ ttf-radisnoir-0.9b/debian/maintscript       2012-02-13 13:17:00.000000000 
+0000
@@ -0,0 +1 @@
+rm_conffile /etc/defoma/hints/ttf-radisnoir.hints 0.9b-2
diff -Nru ttf-radisnoir-0.9b/debian/postinst ttf-radisnoir-0.9b/debian/postinst
--- ttf-radisnoir-0.9b/debian/postinst  2011-07-20 21:59:59.000000000 +0100
+++ ttf-radisnoir-0.9b/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-radisnoir.hints 
0.9b-2 -- "$@"
-fi
-
-#DEBHELPER#
diff -Nru ttf-radisnoir-0.9b/debian/postrm ttf-radisnoir-0.9b/debian/postrm
--- ttf-radisnoir-0.9b/debian/postrm    2011-07-20 22:00:12.000000000 +0100
+++ ttf-radisnoir-0.9b/debian/postrm    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-radisnoir.hints 
0.9b-2 -- "$@"
-fi
-
-#DEBHELPER#
diff -Nru ttf-radisnoir-0.9b/debian/preinst ttf-radisnoir-0.9b/debian/preinst
--- ttf-radisnoir-0.9b/debian/preinst   2011-07-20 22:00:07.000000000 +0100
+++ ttf-radisnoir-0.9b/debian/preinst   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-radisnoir.hints 
0.9b-2 -- "$@"
-fi
-
-#DEBHELPER#

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