[Pkg-xfce-devel] Bug#659890: xfce4-session: use dh_installdeb maintscript support
Package: xfce4-session
Version: 4.8.3-1
Severity: wishlist
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch precise
xfce4-session is currently using dpkg-maintscript-helper without a
pre-dependency. 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 a handwritten postrm at all.
Here's a patch:
* Use maintscript support in dh_installdeb rather than writing out
dpkg-maintscript-helper commands by hand. This adds a Pre-Dependency on
a sufficient version of dpkg.
diff -Nru xfce4-session-4.8.3/debian/control xfce4-session-4.8.3/debian/control
--- xfce4-session-4.8.3/debian/control 2012-02-12 17:05:23.000000000 +0000
+++ xfce4-session-4.8.3/debian/control 2012-02-14 15:10:49.000000000 +0000
@@ -16,7 +16,7 @@
Package: xfce4-session
Section: xfce
Architecture: any
-Pre-Depends: multiarch-support
+Pre-Depends: ${misc:Pre-Depends}, multiarch-support
Depends: ${shlibs:Depends}, ${misc:Depends}, xfce4-settings, xfconf
Recommends: xfwm4, xfce4-utils, xfdesktop4, ${shlibs:Recommends}, consolekit, upower,
dbus-x11, x11-xserver-utils
diff -Nru xfce4-session-4.8.3/debian/maintscript xfce4-session-4.8.3/debian/maintscript
--- xfce4-session-4.8.3/debian/maintscript 1970-01-01 01:00:00.000000000 +0100
+++ xfce4-session-4.8.3/debian/maintscript 2012-02-14 15:10:25.000000000 +0000
@@ -0,0 +1 @@
+rm_conffile /etc/xdg/autostart/xfce4-tips-autostart.desktop 4.8.1-4
diff -Nru xfce4-session-4.8.3/debian/postinst xfce4-session-4.8.3/debian/postinst
--- xfce4-session-4.8.3/debian/postinst 2011-09-13 22:46:59.000000000 +0100
+++ xfce4-session-4.8.3/debian/postinst 2012-02-14 15:10:32.000000000 +0000
@@ -7,9 +7,6 @@
x-session-manager.1.gz /usr/share/man/man1/xfce4-session.1.gz
fi
-dpkg-maintscript-helper rm_conffile \
- /etc/xdg/autostart/xfce4-tips-autostart.desktop 4.8.1-4 -- "$@"
-
#DEBHELPER#
exit 0
diff -Nru xfce4-session-4.8.3/debian/postrm xfce4-session-4.8.3/debian/postrm
--- xfce4-session-4.8.3/debian/postrm 2011-09-13 22:46:59.000000000 +0100
+++ xfce4-session-4.8.3/debian/postrm 1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-#!/bin/sh -e
-
-dpkg-maintscript-helper rm_conffile \
- /etc/xdg/autostart/xfce4-tips-autostart.desktop 4.8.1-4 -- "$@"
-
-#DEBHELPER#
-
-exit 0
diff -Nru xfce4-session-4.8.3/debian/preinst xfce4-session-4.8.3/debian/preinst
--- xfce4-session-4.8.3/debian/preinst 2011-09-13 22:51:47.000000000 +0100
+++ xfce4-session-4.8.3/debian/preinst 2012-02-14 15:10:29.000000000 +0000
@@ -1,8 +1,5 @@
#!/bin/sh -e
-dpkg-maintscript-helper rm_conffile \
- /etc/xdg/autostart/xfce4-tips-autostart.desktop 4.8.1-4 -- "$@"
-
# Remove symlink for el, replaced by a folder in 4.8.2-1
case "$1" in
install|upgrade)
Thanks,
--
Colin Watson [cjwatson at ubuntu.com]
Reply to: