Package: icmake Version: 7.16.01-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 icmake. 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 icmake-7.16.01/debian/control icmake-7.16.01/debian/control --- icmake-7.16.01/debian/control 2011-06-26 17:01:53.000000000 +0100 +++ icmake-7.16.01/debian/control 2012-02-13 15:42:02.000000000 +0000 @@ -5,13 +5,14 @@ Uploaders: George Danchev <danc...@spnet.net>, Frank B. Brokken <f.b.brok...@rug.nl>, tony mancill <tmanc...@debian.org> -Build-Depends: debhelper (>= 7.2.11) +Build-Depends: debhelper (>= 8.1.0~) Standards-Version: 3.9.2 Homepage: http://icmake.sourceforge.net/ Vcs-Svn: https://svn.openfmi.net/debian-addons-bg/icmake/trunk Package: icmake Architecture: any +Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: icmake-doc Description: Intelligent C-like MAKEr, or the ICce MAKE utility diff -Nru icmake-7.16.01/debian/icmake.maintscript icmake-7.16.01/debian/icmake.maintscript --- icmake-7.16.01/debian/icmake.maintscript 1970-01-01 01:00:00.000000000 +0100 +++ icmake-7.16.01/debian/icmake.maintscript 2012-02-13 15:41:15.000000000 +0000 @@ -0,0 +1,3 @@ +rm_conffile /etc/icmake/AUTHOR 7.14.1-1 +rm_conffile /etc/icmake/VERSION 7.14.1-1 +rm_conffile /etc/icmake/YEARS 7.14.1-1 diff -Nru icmake-7.16.01/debian/icmake.postinst icmake-7.16.01/debian/icmake.postinst --- icmake-7.16.01/debian/icmake.postinst 2011-02-17 04:28:38.000000000 +0000 +++ icmake-7.16.01/debian/icmake.postinst 1970-01-01 01:00:00.000000000 +0100 @@ -1,28 +0,0 @@ -#!/bin/sh -e - -# see: /var/lib/dpkg/info/dpkg.preinst, dh_installdeb(1) - -# This script can be called in the following ways: -# -# Before the package is installed: -# <new-preinst> install -# -# Before removed package is upgraded: -# <new-preinst> install <old-version> -# -# Before the package is upgraded: -# <new-preinst> upgrade <old-version> -# -# -# If postrm fails during upgrade or fails on failed upgrade: -# <old-preinst> abort-upgrade <new-version> - - -dpkg-maintscript-helper rm_conffile /etc/icmake/AUTHOR 7.14.1-1 -- "$@" -dpkg-maintscript-helper rm_conffile /etc/icmake/VERSION 7.14.1-1 -- "$@" -dpkg-maintscript-helper rm_conffile /etc/icmake/YEARS 7.14.1-1 -- "$@" - -#DEBHELPER# - -exit 0 - diff -Nru icmake-7.16.01/debian/icmake.postrm icmake-7.16.01/debian/icmake.postrm --- icmake-7.16.01/debian/icmake.postrm 2011-02-17 04:28:38.000000000 +0000 +++ icmake-7.16.01/debian/icmake.postrm 1970-01-01 01:00:00.000000000 +0100 @@ -1,28 +0,0 @@ -#!/bin/sh -e - -# see: /var/lib/dpkg/info/dpkg.preinst, dh_installdeb(1) - -# This script can be called in the following ways: -# -# Before the package is installed: -# <new-preinst> install -# -# Before removed package is upgraded: -# <new-preinst> install <old-version> -# -# Before the package is upgraded: -# <new-preinst> upgrade <old-version> -# -# -# If postrm fails during upgrade or fails on failed upgrade: -# <old-preinst> abort-upgrade <new-version> - - -dpkg-maintscript-helper rm_conffile /etc/icmake/AUTHOR 7.14.1-1 -- "$@" -dpkg-maintscript-helper rm_conffile /etc/icmake/VERSION 7.14.1-1 -- "$@" -dpkg-maintscript-helper rm_conffile /etc/icmake/YEARS 7.14.1-1 -- "$@" - -#DEBHELPER# - -exit 0 - diff -Nru icmake-7.16.01/debian/icmake.preinst icmake-7.16.01/debian/icmake.preinst --- icmake-7.16.01/debian/icmake.preinst 2011-02-17 04:28:38.000000000 +0000 +++ icmake-7.16.01/debian/icmake.preinst 1970-01-01 01:00:00.000000000 +0100 @@ -1,28 +0,0 @@ -#!/bin/sh -e - -# see: /var/lib/dpkg/info/dpkg.preinst, dh_installdeb(1) - -# This script can be called in the following ways: -# -# Before the package is installed: -# <new-preinst> install -# -# Before removed package is upgraded: -# <new-preinst> install <old-version> -# -# Before the package is upgraded: -# <new-preinst> upgrade <old-version> -# -# -# If postrm fails during upgrade or fails on failed upgrade: -# <old-preinst> abort-upgrade <new-version> - - -dpkg-maintscript-helper rm_conffile /etc/icmake/AUTHOR 7.14.1-1 -- "$@" -dpkg-maintscript-helper rm_conffile /etc/icmake/VERSION 7.14.1-1 -- "$@" -dpkg-maintscript-helper rm_conffile /etc/icmake/YEARS 7.14.1-1 -- "$@" - -#DEBHELPER# - -exit 0 - 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