[Pkg-voip-commits] r5501 - in /asterisk-prompt-fr-proformatique/trunk/debian: changelog postinst postrm preinst
lmamane at alioth.debian.org
lmamane at alioth.debian.org
Sun Apr 6 11:47:36 UTC 2008
Author: lmamane
Date: Sun Apr 6 11:47:36 2008
New Revision: 5501
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=5501
Log:
Repair damage done in upgrade to 20070706-1.4-1; ensure upgrades from older versions work well
Added:
asterisk-prompt-fr-proformatique/trunk/debian/postinst
asterisk-prompt-fr-proformatique/trunk/debian/postrm
asterisk-prompt-fr-proformatique/trunk/debian/preinst
Modified:
asterisk-prompt-fr-proformatique/trunk/debian/changelog
Modified: asterisk-prompt-fr-proformatique/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk-prompt-fr-proformatique/trunk/debian/changelog?rev=5501&op=diff
==============================================================================
--- asterisk-prompt-fr-proformatique/trunk/debian/changelog (original)
+++ asterisk-prompt-fr-proformatique/trunk/debian/changelog Sun Apr 6 11:47:36 2008
@@ -4,8 +4,9 @@
* Remove README_fr, does not contain any information useful to Debian
users not in copyright file.
* Reintroduce compatibility with Asterisk configured with "languageprefix=yes"
+ * Ensure all upgrade paths lead to same result.
- --
+ -- Lionel Elie Mamane <lmamane at debian.org> Sun, 06 Apr 2008 13:46:42 +0200
asterisk-prompt-fr-proformatique (20070706-1.4-1) unstable; urgency=low
Added: asterisk-prompt-fr-proformatique/trunk/debian/postinst
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk-prompt-fr-proformatique/trunk/debian/postinst?rev=5501&op=file
==============================================================================
--- asterisk-prompt-fr-proformatique/trunk/debian/postinst (added)
+++ asterisk-prompt-fr-proformatique/trunk/debian/postinst Sun Apr 6 11:47:36 2008
@@ -1,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ configure)
+ if dpkg --compare-versions "$2" lt 20070706-1.4-2; then
+ for d in dictate digits letters phonetic; do
+ for e in "/usr/share/asterisk/sounds/${d}/fr" "/usr/share/asterisk/sounds/fr/${d}"; do
+ if ! [ -L "${e}" ] && [ -d "${e}" ]; then
+ rmdir --ignore-fail-on-non-empty "${e}"
+ fi
+ done
+ done
+ for d in dictate digits letters phonetic; do
+ if ! [ -e "/usr/share/asterisk/sounds/fr/${d}" ]; then
+ ln -s "../${d}/fr" "/usr/share/asterisk/sounds/fr/${d}"
+ fi
+ done
+ fi
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
Added: asterisk-prompt-fr-proformatique/trunk/debian/postrm
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk-prompt-fr-proformatique/trunk/debian/postrm?rev=5501&op=file
==============================================================================
--- asterisk-prompt-fr-proformatique/trunk/debian/postrm (added)
+++ asterisk-prompt-fr-proformatique/trunk/debian/postrm Sun Apr 6 11:47:36 2008
@@ -1,0 +1,20 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ abort-upgrade)
+ if dpkg --compare-versions "$2" lt-nl 20070706-1.4-2; then
+ for d in dictate digits letters phonetic; do
+ if ! [ -e "/usr/share/asterisk/sounds/${d}/fr" ]; then
+ ln -s "../fr/${d}" "/usr/share/asterisk/sounds/${d}/fr"
+ fi
+ done
+ fi
+ ;;
+
+esac
+
+#DEBHELPER#
+
+exit 0
Added: asterisk-prompt-fr-proformatique/trunk/debian/preinst
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk-prompt-fr-proformatique/trunk/debian/preinst?rev=5501&op=file
==============================================================================
--- asterisk-prompt-fr-proformatique/trunk/debian/preinst (added)
+++ asterisk-prompt-fr-proformatique/trunk/debian/preinst Sun Apr 6 11:47:36 2008
@@ -1,0 +1,49 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ upgrade)
+ if dpkg --compare-versions "$2" lt 20070706-1.4-1; then
+ # We are upgrading from a version that has the old
+ # symlinks and file locations.
+ for d in dictate digits letters phonetic; do
+ if [ -L "/usr/share/asterisk/sounds/${d}/fr" ] && \
+ [ "$(readlink "/usr/share/asterisk/sounds/${d}/fr")" = "../fr/${d}" ]; then
+ rm "/usr/share/asterisk/sounds/${d}/fr"
+ fi
+ done
+ elif dpkg --compare-versions "$2" lt 20070706-1.4-2; then
+ # We are upgrading from a version that may or may not have
+ # symlinks, and files in old or new location (because of
+ # how dpkg treats symlinks on upgrades).
+
+ # First, cleanup spurious empty directories some
+ # install/upgrade/purge scenarios leave behind.
+ for d in dictate digits letters phonetic; do
+ for e in "/usr/share/asterisk/sounds/${d}/fr" "/usr/share/asterisk/sounds/fr/${d}"; do
+ if ! [ -L "${e}" ] && [ -d "${e}" ]; then
+ rmdir --ignore-fail-on-non-empty "${e}"
+ fi
+ done
+ done
+
+ # Next, remove old symlinks if present and move files to
+ # their dpkg-known location.
+ for d in dictate digits letters phonetic; do
+ if [ -L "/usr/share/asterisk/sounds/${d}/fr" ] && \
+ [ "$(readlink "/usr/share/asterisk/sounds/${d}/fr")" = "../fr/${d}" ]; then
+ rm "/usr/share/asterisk/sounds/${d}/fr"
+ fi
+ if ! [ -e "/usr/share/asterisk/sounds/${d}/fr" ] && \
+ [ -d "/usr/share/asterisk/sounds/fr/${d}" ]; then
+ mv "/usr/share/asterisk/sounds/fr/${d}" "/usr/share/asterisk/sounds/${d}/fr"
+ fi
+ done
+ fi
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
More information about the Pkg-voip-commits
mailing list