[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, gismo-debian-split-config, updated. debian/0.2.0-git20080909-6-4-g59f3139

Luca Capello luca at pca.it
Sun Oct 26 15:03:19 UTC 2008


The following commit has been merged in the gismo-debian-split-config branch:
commit 59f313926b62a683230d4b4a4de5128248648918
Author: Luca Capello <luca at pca.it>
Date:   Sun Oct 26 16:02:44 2008 +0100

    debian/fso-frameworkd.preinst: new file

diff --git a/debian/changelog b/debian/changelog
index f4b0f5e..eb863c1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ fso-frameworkd (0.2.0-git20080909-7) UNRELEASED; urgency=low
   * debian/55-freerunner.rules: removed.
   * debian/control:
     + Recommends: the fso-config and fso-sounds virtual packages.
+    + Replaces: previous versions.
     - remove gstreamer0.10-plugins-good, gstreamer0.10-plugins-bad
       and gstreamer0.10-plugins-ugly from Depends:, they must be
       pulled in by the fso-sounds-* packages, as they are specific
@@ -16,6 +17,10 @@ fso-frameworkd (0.2.0-git20080909-7) UNRELEASED; urgency=low
       by the fso-config virtual package.
     - don't install the sound files, they are now provided by the
       fso-sounds virtual package.
+  * debian/fso-frameworkd.preinst:
+    + backup the old /etc/frameworkd.conf and udev rules files if
+      they have been modified, since they are now provided by the
+      fso-config virtual package.
   * debian/README.Debian:
     + explain the need for /etc/frameworkd.conf.
   * debian/rules:
diff --git a/debian/control b/debian/control
index 4f204af..6c86217 100644
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,7 @@ Architecture: all
 Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}, python-serial, python-yaml, python-gst0.10, gstreamer0.10-alsa, python-dbus, gsm0710muxd, dbus, alsa-utils, fso-frameworkd-wireless-glue, ppp
 Recommends: fso-config, fso-sounds
 Conflicts: frameworkd
-Replaces: frameworkd
+Replaces: frameworkd, fso-frameworkd (<< 0.2.0-git20080909-6)
 Provides: frameworkd
 Description: freemsmartphone.org Framework Daemon
  This packages provides the backend daemon of the freemsmartphone.org software
diff --git a/debian/fso-frameworkd.preinst b/debian/fso-frameworkd.preinst
new file mode 100644
index 0000000..57765ed
--- /dev/null
+++ b/debian/fso-frameworkd.preinst
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -e
+
+### start of http://wiki.debian.org/DpkgConffileHandling ###
+# 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
+}
+case "$1" in
+    install|upgrade)
+	if dpkg --compare-versions "$2" le "0.2.0-git20080909-6"; then
+            rm_conffile fso-frameworkd "/etc/frameworkd.conf"
+            rm_conffile fso-frameworkd "/etc/udev/rules.d/55-freerunner.rules"
+	fi
+	;;
+    *)
+	;;
+esac
+### end of http://wiki.debian.org/DpkgConffileHandling ###

-- 
FSO frameworkd Debian packaging



More information about the pkg-fso-commits mailing list