[pkg-fso-commits] [SCM] openmoko-files-nonfree, various not DFSG-free files for the Openmoko devices branch, master, updated. debian/20080911-2-5-ga50e06e

Luca Capello luca at pca.it
Fri Oct 31 16:50:24 UTC 2008


The following commit has been merged in the master branch:
commit a50e06e38aebb914e831bfb13dc96b9e08dc7460
Author: Luca Capello <luca at pca.it>
Date:   Fri Oct 31 17:50:17 2008 +0100

    debian/fso-sounds-openmoko-nonfree.preinst: new file

diff --git a/debian/changelog b/debian/changelog
index 41faff9..b9a6e38 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,14 @@
 openmoko-files-nonfree (20080911-4) UNRELEASED; urgency=low
 
+  * debian/control:
+    + Replaces: previous versions.
   * debian/fso-sounds-openmoko-nonfree.install:
     + install the phone file in /usr/share/fso-sounds-rules.
   * debian/fso-sounds-openmoko-nonfree.postinst:
     + correct path for the installed phone file.
+  * debian/fso-sounds-openmoko-nonfree.preinst:
+    + backup the old configuration phone file if they have been
+      modified, since it is now in /usr/share/fso-sounds-rules.
   * debian/fso-sounds-openmoko-nonfree.prerm
     + correct path for the installed phone file.
 
diff --git a/debian/control b/debian/control
index 882b7aa..08f39f2 100644
--- a/debian/control
+++ b/debian/control
@@ -14,6 +14,7 @@ Architecture: all
 Depends: ${shlibs:Depends}, ${misc:Depends}, gstreamer0.10-plugins-ugly
 Suggests: fso-frameworkd
 Conflicts: fso-frameworkd (<< 0.2.0-git20080909-7)
+Replaces: fso-sounds-openmoko-nonfree (<< 20080911-4)
 Provides: fso-sounds
 Description: Openmoko ringtones for the FreeSmartphone.Org frameworkd
  This packages provides the non-free ringtone files distributed by
diff --git a/debian/fso-sounds-openmoko-nonfree.preinst b/debian/fso-sounds-openmoko-nonfree.preinst
new file mode 100644
index 0000000..c5841b8
--- /dev/null
+++ b/debian/fso-sounds-openmoko-nonfree.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 "20080911-3"; then
+            rm_conffile fso-sounds-openmoko-nonfree \
+                /etc/freesmartphone/opreferences/conf/phone/openmoko-nonfree.yaml
+        fi
+        ;;
+    *)
+        ;;
+esac
+### end of http://wiki.debian.org/DpkgConffileHandling ###

-- 
openmoko-files-nonfree, various not DFSG-free files for the Openmoko devices



More information about the pkg-fso-commits mailing list