Package: fbpanel
Version: 6.1-4
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 fbpanel.
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 fbpanel-6.1/debian/control fbpanel-6.1/debian/control
--- fbpanel-6.1/debian/control  2011-08-15 15:25:28.000000000 +0100
+++ fbpanel-6.1/debian/control  2012-02-13 15:07:54.000000000 +0000
@@ -2,13 +2,14 @@
 Section: x11
 Priority: optional
 Maintainer: Ulises Vitulli <der...@debian.org> 
-Build-Depends: debhelper (>= 6.0.7~), autotools-dev, libgtk2.0-dev, 
libxmu-dev, 
+Build-Depends: debhelper (>= 8.1.0~), autotools-dev, libgtk2.0-dev, 
libxmu-dev, 
  libxpm-dev, libx11-dev
 Standards-Version: 3.9.2
 Homepage: http://fbpanel.sourceforge.net/
 
 Package: fbpanel
 Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends}, ${misc:Depends}, librsvg2-common
 Suggests: menu, hicolor-icon-theme
 Description: lightweight X11 desktop panel
diff -Nru fbpanel-6.1/debian/maintscript fbpanel-6.1/debian/maintscript
--- fbpanel-6.1/debian/maintscript      1970-01-01 01:00:00.000000000 +0100
+++ fbpanel-6.1/debian/maintscript      2012-02-13 15:07:17.000000000 +0000
@@ -0,0 +1 @@
+rm_conffile /etc/fbpanel/default
diff -Nru fbpanel-6.1/debian/postinst fbpanel-6.1/debian/postinst
--- fbpanel-6.1/debian/postinst 2011-03-27 07:52:34.000000000 +0100
+++ fbpanel-6.1/debian/postinst 1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-#!/bin/sh
-set -e
-
-# Reference: #588578
-if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
-    dpkg-maintscript-helper rm_conffile /etc/fbpanel/default -- "$@"
-fi
-
-#DEBHELPER#
diff -Nru fbpanel-6.1/debian/postrm fbpanel-6.1/debian/postrm
--- fbpanel-6.1/debian/postrm   2011-03-27 07:45:31.000000000 +0100
+++ fbpanel-6.1/debian/postrm   2012-02-13 15:07:27.000000000 +0000
@@ -5,9 +5,4 @@
     rm -f /etc/menu-methods/fbpanel
 fi
 
-# Reference: #588578
-if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
-    dpkg-maintscript-helper rm_conffile /etc/fbpanel/default -- "$@"
-fi
-
 #DEBHELPER#
diff -Nru fbpanel-6.1/debian/preinst fbpanel-6.1/debian/preinst
--- fbpanel-6.1/debian/preinst  2011-03-27 07:52:42.000000000 +0100
+++ fbpanel-6.1/debian/preinst  1970-01-01 01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-#!/bin/sh
-set -e
-
-# Reference: #588578
-if dpkg-maintscript-helper supports rm_conffile 2>/dev/null; then
-    dpkg-maintscript-helper rm_conffile /etc/fbpanel/default -- "$@"
-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