[26334] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r25523 - trunk/athena/lib/firefox-extension/debian

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Tue May 29 16:58:14 2012

Date: Tue, 29 May 2012 16:58:13 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201205292058.q4TKwDnd020368@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: jdreed
Date: 2012-05-29 16:58:13 -0400 (Tue, 29 May 2012)
New Revision: 25523

Modified:
   trunk/athena/lib/firefox-extension/debian/debathena-firefox-extension.postinst
   trunk/athena/lib/firefox-extension/debian/rules
Log:


Modified: trunk/athena/lib/firefox-extension/debian/debathena-firefox-extension.postinst
===================================================================
--- trunk/athena/lib/firefox-extension/debian/debathena-firefox-extension.postinst	2012-05-29 16:29:21 UTC (rev 25522)
+++ trunk/athena/lib/firefox-extension/debian/debathena-firefox-extension.postinst	2012-05-29 20:58:13 UTC (rev 25523)
@@ -17,61 +17,18 @@
 # for details, see http://www.debian.org/doc/debian-policy/ or
 # the debian-policy package
 
-package=debathena-firefox-extension
-ours=.debathena
-theirs=.debathena-orig
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
 
-undivert_unlink_symlink()
-{
-    file="$1"
-    ourfile="$2"
-    theirfile="$3"
-    if [ ! -L "$file" ] || \
-        [ "$(readlink "$file")" != "$(basename "$ourfile")" -a \
-          "$(readlink "$file")" != "$(basename "$theirfile")" ]; then
-        echo "*** OMINOUS WARNING ***: $file is not linked to either $(basename "$ourfile") or $(basename "$theirfile")" >&2
-    else
-        rm -f "$file"
-    fi
-}
+#DEBHELPER#
 
-undivert_unlink_divert()
-{
-    file="$1"
-    if [ ! -L "$file" ] && [ ! -e "$file" ]; then
-        dpkg-divert --remove --rename --package "$package" "$file"
-    else
-        echo "Not removing diversion of $file by $package" >&2
-    fi
-}
-
-undivert_unlink()
-{
-    prefix=$1
-    suffix=$2
-
-    file=$prefix$suffix
-    ourfile=$prefix$ours$suffix
-    theirfile=$prefix$theirs$suffix
-
-    undivert_unlink_symlink "$file" "$ourfile" "$theirfile"
-    undivert_unlink_divert "$file" "$package"
-}
-
-cleanup_old_diversion() {
-    file="$1"
-    if dpkg-divert --list "${file}" | grep -Fxq "diversion of ${file} to ${file}${theirs} by ${package}"; then
-        undivert_unlink "$file"
-    fi
-}
-
 case "$1" in
     configure)
 	# In 0.9~rc2-0ubuntu2, the conffile moved to /etc/xul-ext
 	# and we horribly broke things.  Let's attempt to unbreak them:
 	ubufox_version="$(dpkg-query -W -f '${Version}' ubufox)"
-	if dpkg --compare-versions "$ubufox_version" ge "0.9~rc2-0ubuntu2"; then
-	    cleanup_old_diversion /etc/firefox-3.0/pref/ubufox.js
+	if dpkg --compare-versions "$ubufox_version" ge "0.9~rc2-0ubuntu2" && [ -d /etc/firefox-3.0/pref ]; then
+	    # The file should have been undiverted at this point
 	    echo "*** The previous OMINOUS WARNING may be safely ignored ***" >&2
 	    # If there are files in the location, move them to
 	    # the new location, unless the user has already done that
@@ -107,9 +64,4 @@
     ;;
 esac
 
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
 exit 0

Modified: trunk/athena/lib/firefox-extension/debian/rules
===================================================================
--- trunk/athena/lib/firefox-extension/debian/rules	2012-05-29 16:29:21 UTC (rev 25522)
+++ trunk/athena/lib/firefox-extension/debian/rules	2012-05-29 20:58:13 UTC (rev 25523)
@@ -4,6 +4,9 @@
 ifneq ($(wildcard /etc/firefox-3.0/pref/ubufox.js),)
     DEB_TRANSFORM_FILES_debathena-firefox-extension += \
 	/etc/firefox-3.0/pref/ubufox.js.debathena
+else
+    DEB_UNDIVERT_FILES_debathena-firefox-extension += \
+	/etc/firefox-3.0/pref/ubufox.js.debathena
 endif
 
 DEB_AUTO_UPDATE_AUTOCONF = 2.50


home help back first fref pref prev next nref lref last post