[Pkg-fonts-devel] Bug#659551: fonts-bpg-georgian: use dh_installdeb maintscript support
Colin Watson
cjwatson at ubuntu.com
Sun Feb 12 00:46:13 UTC 2012
Package: fonts-bpg-georgian
Version: 0.5a-2
Severity: wishlist
Tags: patch
User: ubuntu-devel at 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-bpg-georgian. 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-bpg-georgian-0.5a/debian/control fonts-bpg-georgian-0.5a/debian/control
--- fonts-bpg-georgian-0.5a/debian/control 2011-07-28 14:54:25.000000000 +0100
+++ fonts-bpg-georgian-0.5a/debian/control 2012-02-12 00:44:23.000000000 +0000
@@ -3,13 +3,14 @@
Priority: optional
Maintainer: Debian Fonts Task Force <pkg-fonts-devel at lists.alioth.debian.org>
Uploaders: Christian Perrier <bubulle at debian.org>
-Build-Depends: debhelper (>= 8)
+Build-Depends: debhelper (>= 8.1.0~)
Standards-Version: 3.9.2
Vcs-svn: svn://svn.debian.org/svn/pkg-fonts/packages/fonts-bpg-georgian
Vcs-Browser: http://svn.debian.org/wsvn/pkg-fonts/packages/fonts-bpg-georgian
Package: fonts-bpg-georgian
Architecture: all
+Pre-Depends: ${misc:Pre-Depends}
Depends: ${misc:Depends}
Description: BPG Georgian fonts
This package provides a collection of three Georgian fonts, provided by
diff -Nru fonts-bpg-georgian-0.5a/debian/maintscript fonts-bpg-georgian-0.5a/debian/maintscript
--- fonts-bpg-georgian-0.5a/debian/maintscript 1970-01-01 01:00:00.000000000 +0100
+++ fonts-bpg-georgian-0.5a/debian/maintscript 2012-02-12 00:43:51.000000000 +0000
@@ -0,0 +1 @@
+rm_conffile /etc/defoma/hints/ttf-bpg-georgian-fonts.hints 0.5a-1
diff -Nru fonts-bpg-georgian-0.5a/debian/postinst fonts-bpg-georgian-0.5a/debian/postinst
--- fonts-bpg-georgian-0.5a/debian/postinst 2011-07-28 14:19:22.000000000 +0100
+++ fonts-bpg-georgian-0.5a/debian/postinst 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-bpg-georgian-fonts.hints 0.5a-1 -- "$@"
-fi
-
-#DEBHELPER#
-
diff -Nru fonts-bpg-georgian-0.5a/debian/postrm fonts-bpg-georgian-0.5a/debian/postrm
--- fonts-bpg-georgian-0.5a/debian/postrm 2011-07-28 14:20:12.000000000 +0100
+++ fonts-bpg-georgian-0.5a/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-bpg-georgian-fonts.hints 0.5a-1 -- "$@"
-fi
-
-#DEBHELPER#
-
diff -Nru fonts-bpg-georgian-0.5a/debian/preinst fonts-bpg-georgian-0.5a/debian/preinst
--- fonts-bpg-georgian-0.5a/debian/preinst 2011-07-28 14:19:09.000000000 +0100
+++ fonts-bpg-georgian-0.5a/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-bpg-georgian-fonts.hints 0.5a-1 -- "$@"
-fi
-
-#DEBHELPER#
-
Thanks,
--
Colin Watson [cjwatson at ubuntu.com]
More information about the Pkg-fonts-devel
mailing list