Package: fonts-junicode
Version: 0.6.17+20110915-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
fonts-junicode.  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 fonts-junicode-0.6.17+20110915/debian/control 
fonts-junicode-0.6.17+20110915/debian/control
--- fonts-junicode-0.6.17+20110915/debian/control       2011-10-12 
13:25:26.000000000 +0100
+++ fonts-junicode-0.6.17+20110915/debian/control       2012-02-12 
01:09:44.000000000 +0000
@@ -3,13 +3,14 @@
 Priority: optional
 Maintainer: Debian Fonts Task Force <pkg-fonts-de...@lists.alioth.debian.org>
 Uploaders: Gürkan Sengün <gur...@phys.ethz.ch>
-Build-Depends: debhelper (>= 8), fontforge, xgridfit, libxml2-utils, 
python-libxml2
+Build-Depends: debhelper (>= 8.1.0~), fontforge, xgridfit, libxml2-utils, 
python-libxml2
 Standards-Version: 3.9.2
 Homepage: http://junicode.sourceforge.net/
 
 Package: fonts-junicode
 Architecture: all
 Recommends: x-ttcidfont-conf | fontconfig
+Pre-Depends: ${misc:Pre-Depends}
 Depends: ${misc:Depends}
 Replaces: ttf-junicode (<< 0.6.17+20110525-1)
 Conflicts: ttf-junicode (<< 0.6.17+20110525-1)
diff -Nru fonts-junicode-0.6.17+20110915/debian/maintscript 
fonts-junicode-0.6.17+20110915/debian/maintscript
--- fonts-junicode-0.6.17+20110915/debian/maintscript   1970-01-01 
01:00:00.000000000 +0100
+++ fonts-junicode-0.6.17+20110915/debian/maintscript   2012-02-12 
01:08:19.000000000 +0000
@@ -0,0 +1 @@
+rm_conffile /etc/defoma/hints/ttf-junicode.hints 0.6.17-1
diff -Nru fonts-junicode-0.6.17+20110915/debian/postinst 
fonts-junicode-0.6.17+20110915/debian/postinst
--- fonts-junicode-0.6.17+20110915/debian/postinst      2011-05-26 
12:03:13.000000000 +0100
+++ fonts-junicode-0.6.17+20110915/debian/postinst      1970-01-01 
01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-set -e
-
-CFILE='/etc/defoma/hints/ttf-junicode.hints'
-dpkg-maintscript-helper rm_conffile $CFILE 0.6.17-1 -- "$@"
-
-#DEBHELPER#
diff -Nru fonts-junicode-0.6.17+20110915/debian/postrm 
fonts-junicode-0.6.17+20110915/debian/postrm
--- fonts-junicode-0.6.17+20110915/debian/postrm        2011-05-26 
12:03:08.000000000 +0100
+++ fonts-junicode-0.6.17+20110915/debian/postrm        1970-01-01 
01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-set -e
-
-CFILE='/etc/defoma/hints/ttf-junicode.hints'
-dpkg-maintscript-helper rm_conffile $CFILE 0.6.17-1 -- "$@"
-
-#DEBHELPER#
diff -Nru fonts-junicode-0.6.17+20110915/debian/preinst 
fonts-junicode-0.6.17+20110915/debian/preinst
--- fonts-junicode-0.6.17+20110915/debian/preinst       2011-05-26 
12:02:55.000000000 +0100
+++ fonts-junicode-0.6.17+20110915/debian/preinst       1970-01-01 
01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-set -e
-
-CFILE='/etc/defoma/hints/ttf-junicode.hints'
-if dpkg-maintscript-helper supports rm_conffile; then
-    dpkg-maintscript-helper rm_conffile $CFILE 0.6.17-1 -- "$@"
-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