Package: midori Version: 0.4.3-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 midori. 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. Note that I adjusted the position of the #DEBHELPER# token in the postinst since it now needs to come before the rmdir. * 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 midori-0.4.3/debian/control midori-0.4.3/debian/control --- midori-0.4.3/debian/control 2011-12-18 13:47:40.000000000 +0000 +++ midori-0.4.3/debian/control 2012-02-13 17:05:30.000000000 +0000 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Ryan Niebur <r...@debian.org> Uploaders: Yves-Alexis Perez <cor...@debian.org> -Build-Depends: debhelper (>= 7.0.50), +Build-Depends: debhelper (>= 8.1.0~), lsb-release, libgtk2.0-dev (>= 2.10), libglib2.0-dev, @@ -38,6 +38,7 @@ Package: midori Architecture: any +Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends}, dbus-x11 Recommends: gnome-icon-theme Provides: www-browser diff -Nru midori-0.4.3/debian/midori.maintscript midori-0.4.3/debian/midori.maintscript --- midori-0.4.3/debian/midori.maintscript 1970-01-01 01:00:00.000000000 +0100 +++ midori-0.4.3/debian/midori.maintscript 2012-02-13 17:03:47.000000000 +0000 @@ -0,0 +1 @@ +mv_conffile /etc/xdg/midori/extensions/libadblock.so/config /etc/xdg/midori/extensions/adblock/config 0.4.1-2 diff -Nru midori-0.4.3/debian/midori.postinst.base midori-0.4.3/debian/midori.postinst.base --- midori-0.4.3/debian/midori.postinst.base 2011-12-18 13:47:40.000000000 +0000 +++ midori-0.4.3/debian/midori.postinst.base 2012-02-13 17:04:41.000000000 +0000 @@ -9,10 +9,6 @@ x-www-browser.1.gz /usr/share/man/man1/midori.1.gz ;; esac -dpkg-maintscript-helper mv_conffile \ - /etc/xdg/midori/extensions/libadblock.so/config \ - /etc/xdg/midori/extensions/adblock/config \ - 0.4.1-2 midori -- "$@" -rmdir /etc/xdg/midori/extensions/libadblock.so || true #DEBHELPER# +rmdir /etc/xdg/midori/extensions/libadblock.so || true exit 0 diff -Nru midori-0.4.3/debian/midori.postrm midori-0.4.3/debian/midori.postrm --- midori-0.4.3/debian/midori.postrm 2011-12-18 13:47:40.000000000 +0000 +++ midori-0.4.3/debian/midori.postrm 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -#!/bin/sh -set -e -dpkg-maintscript-helper mv_conffile \ - /etc/xdg/midori/extensions/libadblock.so/config \ - /etc/xdg/midori/extensions/adblock/config \ - 0.4.1-2 midori -- "$@" -#DEBHELPER# -exit 0 diff -Nru midori-0.4.3/debian/midori.preinst midori-0.4.3/debian/midori.preinst --- midori-0.4.3/debian/midori.preinst 2011-12-18 13:47:40.000000000 +0000 +++ midori-0.4.3/debian/midori.preinst 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -#!/bin/sh -set -e -dpkg-maintscript-helper mv_conffile \ - /etc/xdg/midori/extensions/libadblock.so/config \ - /etc/xdg/midori/extensions/adblock/config \ - 0.4.1-2 midori -- "$@" -#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