Package: tmux
Version: 1.6-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 tmux.  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.
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 tmux-1.6/debian/control tmux-1.6/debian/control
--- tmux-1.6/debian/control     2012-01-23 18:25:26.000000000 +0000
+++ tmux-1.6/debian/control     2012-02-13 18:46:04.000000000 +0000
@@ -14,6 +14,7 @@
 
 Package: tmux
 Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: terminal multiplexer
  tmux enables a number of terminals (or windows) to be accessed and
diff -Nru tmux-1.6/debian/maintscript tmux-1.6/debian/maintscript
--- tmux-1.6/debian/maintscript 1970-01-01 01:00:00.000000000 +0100
+++ tmux-1.6/debian/maintscript 2012-02-13 18:45:18.000000000 +0000
@@ -0,0 +1 @@
+rm_conffile /etc/init.d/tmux-cleanup 1.4-6
diff -Nru tmux-1.6/debian/postinst tmux-1.6/debian/postinst
--- tmux-1.6/debian/postinst    2012-01-23 18:25:26.000000000 +0000
+++ tmux-1.6/debian/postinst    2012-02-13 18:45:34.000000000 +0000
@@ -2,10 +2,6 @@
 
 set -e
 
-if dpkg-maintscript-helper supports rm_conffile; then
-    dpkg-maintscript-helper rm_conffile /etc/init.d/tmux-cleanup 1.4-6 -- "$@"
-fi
-
 if [ "$1" = "configure" ]; then
     if [ -z "$2" ] || dpkg --compare-versions "$2" lt "1.5-3"; then
        add-shell /usr/bin/tmux
diff -Nru tmux-1.6/debian/postrm tmux-1.6/debian/postrm
--- tmux-1.6/debian/postrm      2012-01-23 18:25:26.000000000 +0000
+++ tmux-1.6/debian/postrm      2012-02-13 18:45:37.000000000 +0000
@@ -2,10 +2,6 @@
 
 set -e
 
-if dpkg-maintscript-helper supports rm_conffile; then
-    dpkg-maintscript-helper rm_conffile /etc/init.d/tmux-cleanup 1.4-6 -- "$@"
-fi
-
 if [ "$1" = "remove" ]; then
     remove-shell /usr/bin/tmux
 fi
diff -Nru tmux-1.6/debian/preinst tmux-1.6/debian/preinst
--- tmux-1.6/debian/preinst     2012-01-23 18:25:26.000000000 +0000
+++ tmux-1.6/debian/preinst     2012-02-13 18:45:41.000000000 +0000
@@ -7,8 +7,4 @@
     update-rc.d -f tmux-cleanup remove >/dev/null
 fi
 
-if dpkg-maintscript-helper supports rm_conffile; then
-    dpkg-maintscript-helper rm_conffile /etc/init.d/tmux-cleanup 1.4-6 -- "$@"
-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