[25614] in Source-Commits

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

/svn/athena r25127 - trunk/debathena/config/from-config/debian

daemon@ATHENA.MIT.EDU (Geoffrey Thomas)
Wed May 4 02:52:00 2011

Date: Wed, 4 May 2011 02:50:49 -0400
From: Geoffrey Thomas <geofft@MIT.EDU>
Message-Id: <201105040650.p446onov032702@drugstore.mit.edu>
To: source-commits@mit.edu
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: geofft
Date: 2011-05-04 02:50:48 -0400 (Wed, 04 May 2011)
New Revision: 25127

Modified:
   trunk/debathena/config/from-config/debian/changelog
   trunk/debathena/config/from-config/debian/control.in
   trunk/debathena/config/from-config/debian/postinst-alternatives
   trunk/debathena/config/from-config/debian/rules
Log:
In from-config:
  * Use config-package-dev 4.12 (yay) to handle undiversions, instead of
    a copy of a broken version of its undiversions code.


Modified: trunk/debathena/config/from-config/debian/changelog
===================================================================
--- trunk/debathena/config/from-config/debian/changelog	2011-05-03 06:55:20 UTC (rev 25126)
+++ trunk/debathena/config/from-config/debian/changelog	2011-05-04 06:50:48 UTC (rev 25127)
@@ -1,3 +1,10 @@
+debathena-from-config (1.5.2) unstable; urgency=low
+
+  * Use config-package-dev 4.12 (yay) to handle undiversions, instead of
+    a copy of a broken version of its undiversions code.
+
+ -- Geoffrey Thomas <geofft@mit.edu>  Wed, 04 May 2011 02:42:42 -0400
+
 debathena-from-config (1.5.1) unstable; urgency=low
 
   * Actually spell "alternatives" correctly when calling update-alternatives

Modified: trunk/debathena/config/from-config/debian/control.in
===================================================================
--- trunk/debathena/config/from-config/debian/control.in	2011-05-03 06:55:20 UTC (rev 25126)
+++ trunk/debathena/config/from-config/debian/control.in	2011-05-04 06:50:48 UTC (rev 25127)
@@ -2,7 +2,7 @@
 Section: debathena-config/mail
 Priority: extra
 Maintainer: Debathena Project <debathena@mit.edu>
-Build-Depends: @cdbs@, bsdmainutils
+Build-Depends: @cdbs@, bsdmainutils, config-package-dev (>= 4.12~)
 Standards-Version: 3.7.2
 
 Package: debathena-from-config

Modified: trunk/debathena/config/from-config/debian/postinst-alternatives
===================================================================
--- trunk/debathena/config/from-config/debian/postinst-alternatives	2011-05-03 06:55:20 UTC (rev 25126)
+++ trunk/debathena/config/from-config/debian/postinst-alternatives	2011-05-04 06:50:48 UTC (rev 25127)
@@ -19,58 +19,8 @@
 
 #DEBHELPER#
 
-package=debathena-from-config
-ours=.debathena
-theirs=.debathena-orig
-
-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
-}
-
-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)
-	cleanup_old_diversion /usr/bin/from.debathena
-	cleanup_old_diversion /usr/share/man/man1/from.debathena.1.gz
 	update-alternatives \
             --install /usr/bin/from from /usr/bin/from.debathena 100 \
 	    --slave /usr/share/man/man1/from.1.gz from.1.gz /usr/share/man/man1/from.debathena.1.gz

Modified: trunk/debathena/config/from-config/debian/rules
===================================================================
--- trunk/debathena/config/from-config/debian/rules	2011-05-03 06:55:20 UTC (rev 25126)
+++ trunk/debathena/config/from-config/debian/rules	2011-05-04 06:50:48 UTC (rev 25127)
@@ -14,7 +14,9 @@
 	echo "debathena-from-config-breaks=bsdmainutils (>= 8.0.6~)" >> debian/debathena-from-config.substvars
 else
     # Newer packages: undivert, generate Conflicts, generate postinst
-    # Except we can't use DEB_UNDIVERT_FILES because of Trac #549
+    DEB_UNDIVERT_FILES_debathena-from-config += \
+	/usr/bin/from.debathena \
+	/usr/share/man/man1/from.debathena.1.gz
     binary-predeb/debathena-from-config::
 	echo "debathena-from-config-conflicts=bsdmainutils (<< 8.0.6~)" >> debian/debathena-from-config.substvars
     common-build-indep::


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