[Pkg-xfce-commits] r4238 - desktop/branches/experimental/xfce4-panel/debian

Lionel Le Folgoc mrpouit-guest at alioth.debian.org
Sun Aug 29 11:29:46 UTC 2010


Author: mrpouit-guest
Date: 2010-08-29 11:29:46 +0000 (Sun, 29 Aug 2010)
New Revision: 4238

Added:
   desktop/branches/experimental/xfce4-panel/debian/xfce4-panel.postrm
Modified:
   desktop/branches/experimental/xfce4-panel/debian/changelog
   desktop/branches/experimental/xfce4-panel/debian/xfce4-panel.postinst
   desktop/branches/experimental/xfce4-panel/debian/xfce4-panel.preinst
Log:
debian/xfce4-panel.{preinst,postinst,prerm}: use dpkg-maintscript-helper
to remove pre-xfconf config files.

Modified: desktop/branches/experimental/xfce4-panel/debian/changelog
===================================================================
--- desktop/branches/experimental/xfce4-panel/debian/changelog	2010-08-29 11:08:38 UTC (rev 4237)
+++ desktop/branches/experimental/xfce4-panel/debian/changelog	2010-08-29 11:29:46 UTC (rev 4238)
@@ -16,6 +16,8 @@
     - temporarily comment out LDFLAGS as it ftbfs with --as-needed
     - dropped rc files mangling as they don't exist anymore
     - updated removal of *.{l,}a files.
+  * debian/xfce4-panel.{preinst,postinst,prerm}: use dpkg-maintscript-helper
+    to remove pre-xfconf config files.
 
  -- Lionel Le Folgoc <mrpouit at gmail.com>  Sun, 18 Jul 2010 12:48:23 +0200
 

Modified: desktop/branches/experimental/xfce4-panel/debian/xfce4-panel.postinst
===================================================================
--- desktop/branches/experimental/xfce4-panel/debian/xfce4-panel.postinst	2010-08-29 11:08:38 UTC (rev 4237)
+++ desktop/branches/experimental/xfce4-panel/debian/xfce4-panel.postinst	2010-08-29 11:29:46 UTC (rev 4238)
@@ -2,11 +2,28 @@
 
 set -e
 
+LASTVER="4.7.0" 
+
+if dpkg-maintscript-helper supports rm_conffile; then
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/clock-14.rc "$LASTVER" -- "$@"
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/launcher-10.rc "$LASTVER" -- "$@"
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/launcher-7.rc "$LASTVER" -- "$@"
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/launcher-9.rc "$LASTVER" -- "$@"
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/panels.xml "$LASTVER" -- "$@"
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/systray-4.rc "$LASTVER" -- "$@"
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/xfce4-menu-5.rc "$LASTVER" -- "$@"
+fi
+
 if [ "$1" = "configure" ]; then
 	# Run ldconfig to update shared library system
 	ldconfig
 fi
 
 #DEBHELPER#
-
-exit 0

Added: desktop/branches/experimental/xfce4-panel/debian/xfce4-panel.postrm
===================================================================
--- desktop/branches/experimental/xfce4-panel/debian/xfce4-panel.postrm	                        (rev 0)
+++ desktop/branches/experimental/xfce4-panel/debian/xfce4-panel.postrm	2010-08-29 11:29:46 UTC (rev 4238)
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -e
+
+LASTVER="4.7.0" 
+
+if dpkg-maintscript-helper supports rm_conffile; then
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/clock-14.rc "$LASTVER" -- "$@"
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/launcher-10.rc "$LASTVER" -- "$@"
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/launcher-7.rc "$LASTVER" -- "$@"
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/launcher-9.rc "$LASTVER" -- "$@"
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/panels.xml "$LASTVER" -- "$@"
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/systray-4.rc "$LASTVER" -- "$@"
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/xfce4-menu-5.rc "$LASTVER" -- "$@"
+fi
+
+#DEBHELPER#


Property changes on: desktop/branches/experimental/xfce4-panel/debian/xfce4-panel.postrm
___________________________________________________________________
Added: svn:executable
   + *

Modified: desktop/branches/experimental/xfce4-panel/debian/xfce4-panel.preinst
===================================================================
--- desktop/branches/experimental/xfce4-panel/debian/xfce4-panel.preinst	2010-08-29 11:08:38 UTC (rev 4237)
+++ desktop/branches/experimental/xfce4-panel/debian/xfce4-panel.preinst	2010-08-29 11:29:46 UTC (rev 4238)
@@ -2,37 +2,23 @@
 
 set -e
 
-# Remove a no-longer used conffile
-rm_conffile() {
-    local PKGNAME="$1"
-    local CONFFILE="$2"
+LASTVER="4.7.0" 
 
-    [ -e "$CONFFILE" ] || return 0
+if dpkg-maintscript-helper supports rm_conffile; then
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/clock-14.rc "$LASTVER" -- "$@"
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/launcher-10.rc "$LASTVER" -- "$@"
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/launcher-7.rc "$LASTVER" -- "$@"
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/launcher-9.rc "$LASTVER" -- "$@"
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/panels.xml "$LASTVER" -- "$@"
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/systray-4.rc "$LASTVER" -- "$@"
+  dpkg-maintscript-helper rm_conffile \
+    /etc/xdg/xfce4/panel/xfce4-menu-5.rc "$LASTVER" -- "$@"
+fi
 
-    local md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')"
-    local old_md5sum="$(dpkg-query -W -f='${Conffiles}' $PKGNAME | \
-            sed -n -e "\' $CONFFILE ' { s/ obsolete$//; s/.* //; p }")"
-    if [ "$md5sum" != "$old_md5sum" ]; then
-        echo "Obsolete conffile $CONFFILE has been modified by you."
-        echo "Saving as $CONFFILE.dpkg-bak ..."
-        mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
-    else
-        echo "Removing obsolete conffile $CONFFILE ..."
-        rm -f "$CONFFILE"
-    fi
-}
-
-case "$1" in
-install|upgrade)
-    if dpkg --compare-versions "$2" lt-nl "4.7.0"; then
-        rm_conffile xfce4-panel "/etc/xdg/xfce4/panel/clock-14.rc"
-        rm_conffile xfce4-panel "/etc/xdg/xfce4/panel/launcher-10.rc"
-        rm_conffile xfce4-panel "/etc/xdg/xfce4/panel/launcher-7.rc"
-        rm_conffile xfce4-panel "/etc/xdg/xfce4/panel/launcher-9.rc"
-        rm_conffile xfce4-panel "/etc/xdg/xfce4/panel/panels.xml"
-        rm_conffile xfce4-panel "/etc/xdg/xfce4/panel/systray-4.rc"
-        rm_conffile xfce4-panel "/etc/xdg/xfce4/panel/xfce4-menu-5.rc"
-    fi
-esac
-
 #DEBHELPER#




More information about the Pkg-xfce-commits mailing list