[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xorg: Changes to 'debian-experimental'



 debian/changelog         |    4 +++-
 debian/xutils.preinst.in |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+), 1 deletion(-)

New commits:
commit fc652717b691821cc89648422a1b4cfbc3a80c3c
Author: Brice Goglin <bgoglin@debian.org>
Date:   Mon Mar 24 17:00:58 2008 +0100

    Add xutils preinst to drop obsolete /etc/X11/rstart/ files

diff --git a/debian/changelog b/debian/changelog
index 7e71a01..5396a6b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,8 +15,10 @@ xorg (1:7.4~1) UNRELEASED; urgency=low
   * Remove the dependency of xutils against xutils-dev, it was only useful
     for transitional purpose in Etch, closes: #418123.
   * Remove the obsolete /etc/init.d/xserver-xorg, closes: #459507.
+  * Add xutils preinst to drop obsolete /etc/X11/rstart/ files,
+    closes: #382360.
 
- -- Brice Goglin <bgoglin@debian.org>  Sun, 23 Mar 2008 14:02:30 +0100
+ -- Brice Goglin <bgoglin@debian.org>  Mon, 24 Mar 2008 16:41:31 +0100
 
 xorg (1:7.3+11) UNRELEASED; urgency=low
 
diff --git a/debian/xutils.preinst.in b/debian/xutils.preinst.in
new file mode 100644
index 0000000..2c0cc29
--- /dev/null
+++ b/debian/xutils.preinst.in
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+set -e
+
+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
+}
+
+case "$1" in
+install|upgrade)
+    if dpkg --compare-versions "$2" lt "1:7.4~1"; then
+	rm_conffile xutils "/etc/X11/rstart/commands/x11r6/@List"
+	rm_conffile xutils "/etc/X11/rstart/commands/x11r6/LoadMonitor"
+	rm_conffile xutils "/etc/X11/rstart/commands/x11r6/Terminal"
+	rm_conffile xutils "/etc/X11/rstart/commands/@List"
+	rm_conffile xutils "/etc/X11/rstart/commands/ListContexts"
+	rm_conffile xutils "/etc/X11/rstart/commands/ListGenericCommands"
+	rm_conffile xutils "/etc/X11/rstart/contexts/@List"
+	rm_conffile xutils "/etc/X11/rstart/contexts/default"
+	rm_conffile xutils "/etc/X11/rstart/contexts/x11r6"
+	rm_conffile xutils "/etc/X11/rstart/config"
+	rm_conffile xutils "/etc/X11/rstart/rstartd.real"
+	rmdir /etc/X11/rstart/commands/x11r6/ || true
+	rmdir /etc/X11/rstart/commands/ || true
+	rmdir /etc/X11/rstart/contexts/ || true
+	rmdir /etc/X11/rstart/ || true
+    fi
+esac
+
+#DEBHELPER#
+
+exit 0
+
+# vim:set ai et sts=2 sw=2 tw=0:


Reply to: