r18168 - in /desktop/experimental/gvfs/debian: changelog gvfs-bin.preinst
joss at users.alioth.debian.org
joss at users.alioth.debian.org
Sun Jan 4 12:30:24 UTC 2009
Author: joss
Date: Sun Jan 4 12:30:24 2009
New Revision: 18168
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=18168
Log:
Remove the old profile.d conffile in the preinst.
Added:
desktop/experimental/gvfs/debian/gvfs-bin.preinst
Modified:
desktop/experimental/gvfs/debian/changelog
Modified: desktop/experimental/gvfs/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gvfs/debian/changelog?rev=18168&op=diff
==============================================================================
--- desktop/experimental/gvfs/debian/changelog (original)
+++ desktop/experimental/gvfs/debian/changelog Sun Jan 4 12:30:24 2009
@@ -3,6 +3,7 @@
* Only suggest gvfs-backends. Nautilus already recommends it.
* Install the completion file in /etc/bash_completion.d.
Closes: #508294.
+ * Remove the old profile.d conffile in the preinst.
* New upstream release.
* 01_maintainer_mode.patch: updated for the new version.
Added: desktop/experimental/gvfs/debian/gvfs-bin.preinst
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gvfs/debian/gvfs-bin.preinst?rev=18168&op=file
==============================================================================
--- desktop/experimental/gvfs/debian/gvfs-bin.preinst (added)
+++ desktop/experimental/gvfs/debian/gvfs-bin.preinst Sun Jan 4 12:30:24 2009
@@ -1,0 +1,28 @@
+#!/bin/sh
+set -e
+
+# Remove a no-longer used conffile
+rm_conffile() {
+ PKGNAME="$1"
+ CONFFILE="$2"
+
+ if [ -e "$CONFFILE" ]; then
+ md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
+ 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
+ fi
+}
+
+if [ "$1" = upgrade ] && dpkg --compare-versions "$2" lt 1.0.3-1; then
+ rm_conffile gvfs-bin /etc/profile.d/gvfs-bash-completion.sh
+fi
+
+
+#DEBHELPER#
More information about the pkg-gnome-commits
mailing list