[Pkg-cli-apps-commits] r4116 - in /packages/gnome-do/trunk/debian: changelog gnome-do.preinst

raof-guest at users.alioth.debian.org raof-guest at users.alioth.debian.org
Sun Aug 24 22:28:49 UTC 2008


Author: raof-guest
Date: Sun Aug 24 22:28:49 2008
New Revision: 4116

URL: http://svn.debian.org/wsvn/pkg-cli-apps/?sc=1&rev=4116
Log:
Remove old autostart file on upgrade; prevents Do from appearing twice in the Sessions list

Added:
    packages/gnome-do/trunk/debian/gnome-do.preinst
Modified:
    packages/gnome-do/trunk/debian/changelog

Modified: packages/gnome-do/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-cli-apps/packages/gnome-do/trunk/debian/changelog?rev=4116&op=diff
==============================================================================
--- packages/gnome-do/trunk/debian/changelog (original)
+++ packages/gnome-do/trunk/debian/changelog Sun Aug 24 22:28:49 2008
@@ -8,6 +8,9 @@
   * debian/gnome-do.install
     + Delete our desktop file, install upstream's translated desktop file
       to /etc/xdg/autostart instead.
+  * debian/gnome-do.preinst
+    + Remove old autostart file on upgrade (if unmodified).  Otherwise 
+      GNOME Do will appear twice in the autostart list.
   * debian/gnome-do.1
     + Manpage updated for new version
   * debian/rules:
@@ -17,7 +20,7 @@
     + Refresh for new upstream version
     + Update to more recent CopyrightFormat proposal
 
- -- Christopher James Halse Rogers <raof at ubuntu.com>  Sun, 24 Aug 2008 16:54:58 +1000
+ -- Christopher James Halse Rogers <raof at ubuntu.com>  Mon, 25 Aug 2008 08:27:54 +1000
 
 gnome-do (0.4.2.0-1) unstable; urgency=low
 

Added: packages/gnome-do/trunk/debian/gnome-do.preinst
URL: http://svn.debian.org/wsvn/pkg-cli-apps/packages/gnome-do/trunk/debian/gnome-do.preinst?rev=4116&op=file
==============================================================================
--- packages/gnome-do/trunk/debian/gnome-do.preinst (added)
+++ packages/gnome-do/trunk/debian/gnome-do.preinst Sun Aug 24 22:28:49 2008
@@ -1,0 +1,28 @@
+#!/bin/sh -e
+
+# gnome-do 0.4.2.0-1 installed an autostart file to /etc/xdg/autostart
+# Upstream now has its own handling of autostart with a different filename, 
+# which can make Do appear twice on the autostart list.
+#
+# Remove the previously installed autostart file, if it hasn't been modified.
+
+OLD_AUTOSTART=/etc/xdg/autostart/gnome-do-autostart.desktop
+OLD_AUTOSTART_MD5SUM=c3fe3975541f89a0c9e78b4481445683
+
+if [ "$1" = "upgrade" -o "$1" = "install" ] && \
+   [ "$2" = "0.4.2.0-1" ] ; then
+    if [ -f $OLD_AUTOSTART ] ; then
+        echo "Found old autostart file: $OLD_AUTOSTART..."
+        if [ "$(md5sum $OLD_AUTOSTART | cut -f 1 -d ' ')" = "$OLD_AUTOSTART_MD5SUM" ] ; 
+        then
+            # The old file has been left unchanged, we can delete it
+            echo "Removing unmodified autostart file in favour of new one."
+            rm -f $OLD_AUTOSTART
+        else
+            echo "Autostart file has been modified.  Leaving untouched."
+	    echo "GNOME Do may appear twice in your autostart list."
+        fi
+    fi
+fi
+
+#DEBHELPER#




More information about the Pkg-cli-apps-commits mailing list