Package: ept-cache Version: 1.0.6~exp1 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 ept-cache. 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 could remove some of your handwritten maintainer scripts entirely. 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 libept-1.0.6~exp1/debian/control libept-1.0.6~exp1ubuntu1/debian/control --- libept-1.0.6~exp1/debian/control 2012-01-24 13:31:50.000000000 +0000 +++ libept-1.0.6~exp1ubuntu1/debian/control 2012-02-13 15:00:47.000000000 +0000 @@ -3,7 +3,7 @@ Priority: important Maintainer: Enrico Zini <enr...@debian.org> Uploaders: Petr Rockai <mornf...@debian.org> -Build-Depends: cdbs, debhelper (>> 5), dh-buildinfo, doxygen, libapt-pkg-dev (>= 0.6.46.1), libwibble-dev (>= 0.1.23), libwibble-dev (<< 0.2), libtagcoll2-dev (>= 2.0.6), libtagcoll2-dev (<< 2.1), pkg-config, libxapian-dev (>= 1.0.5), cmake (>= 2.6) +Build-Depends: cdbs, debhelper (>= 8.1.0~), dh-buildinfo, doxygen, libapt-pkg-dev (>= 0.6.46.1), libwibble-dev (>= 0.1.23), libwibble-dev (<< 0.2), libtagcoll2-dev (>= 2.0.6), libtagcoll2-dev (<< 2.1), pkg-config, libxapian-dev (>= 1.0.5), cmake (>= 2.6) Standards-Version: 3.9.0.0 Vcs-Git: git://git.debian.org/git/debtags/libept.git Vcs-Browser: http://git.debian.org/?p=debtags/libept.git @@ -47,6 +47,7 @@ Package: ept-cache Architecture: all Section: misc +Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends}, apt-xapian-index (>= 0.30) Recommends: debtags Description: Obsolete commandline tool to search the package archive diff -Nru libept-1.0.6~exp1/debian/ept-cache.maintscript libept-1.0.6~exp1ubuntu1/debian/ept-cache.maintscript --- libept-1.0.6~exp1/debian/ept-cache.maintscript 1970-01-01 01:00:00.000000000 +0100 +++ libept-1.0.6~exp1ubuntu1/debian/ept-cache.maintscript 2012-02-13 14:59:10.000000000 +0000 @@ -0,0 +1 @@ +rm_conffile /etc/cron.weekly/ept-cache 1.0.1 diff -Nru libept-1.0.6~exp1/debian/ept-cache.postinst libept-1.0.6~exp1ubuntu1/debian/ept-cache.postinst --- libept-1.0.6~exp1/debian/ept-cache.postinst 2012-01-24 13:03:06.000000000 +0000 +++ libept-1.0.6~exp1ubuntu1/debian/ept-cache.postinst 2012-02-13 15:00:05.000000000 +0000 @@ -9,9 +9,4 @@ fi fi -# FIXME: remove test when we are not interested in lenny anymore -if test -x /usr/bin/dpkg-maintscript-helper && dpkg-maintscript-helper supports rm_conffile; then - dpkg-maintscript-helper rm_conffile /etc/cron.weekly/ept-cache 1.0.1 -- "$@" -fi - #DEBHELPER# diff -Nru libept-1.0.6~exp1/debian/ept-cache.postrm libept-1.0.6~exp1ubuntu1/debian/ept-cache.postrm --- libept-1.0.6~exp1/debian/ept-cache.postrm 2012-01-24 13:03:06.000000000 +0000 +++ libept-1.0.6~exp1ubuntu1/debian/ept-cache.postrm 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -#!/bin/sh - -set -e - -# FIXME: remove test when we are not interested in lenny anymore -if test -x /usr/bin/dpkg-maintscript-helper && dpkg-maintscript-helper supports rm_conffile; then - dpkg-maintscript-helper rm_conffile /etc/cron.weekly/ept-cache 1.0.1 -- "$@" -fi - -#DEBHELPER# diff -Nru libept-1.0.6~exp1/debian/ept-cache.preinst libept-1.0.6~exp1ubuntu1/debian/ept-cache.preinst --- libept-1.0.6~exp1/debian/ept-cache.preinst 2012-01-24 13:03:06.000000000 +0000 +++ libept-1.0.6~exp1ubuntu1/debian/ept-cache.preinst 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -#!/bin/sh - -set -e - -# FIXME: remove test when we are not interested in lenny anymore -if test -x /usr/bin/dpkg-maintscript-helper && dpkg-maintscript-helper supports rm_conffile; then - dpkg-maintscript-helper rm_conffile /etc/cron.weekly/ept-cache 1.0.1 -- "$@" -fi - -#DEBHELPER# diff -Nru libept-1.0.6~exp1/debian/ept-cache.prerm libept-1.0.6~exp1ubuntu1/debian/ept-cache.prerm --- libept-1.0.6~exp1/debian/ept-cache.prerm 2012-01-24 13:03:06.000000000 +0000 +++ libept-1.0.6~exp1ubuntu1/debian/ept-cache.prerm 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -#!/bin/sh - -set -e - -# FIXME: remove test when we are not interested in lenny anymore -if test -x /usr/bin/dpkg-maintscript-helper && dpkg-maintscript-helper supports rm_conffile; then - dpkg-maintscript-helper rm_conffile /etc/cron.weekly/ept-cache 1.0.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