Browse Source

* Completely remove md5sum diversion madness. Instead, we Pre-Depend
on a version of textutils which provides /usr/bin/md5sum. We rely on
the logic in coreutils to remove our diversions. Patch by
Ian Jackson. Closes: #315784, #313605

Frank Lichtenheld 18 years ago
parent
commit
0a8dfdd964
5 changed files with 18 additions and 41 deletions
  1. 13 0
      ChangeLog
  2. 4 0
      debian/changelog
  3. 1 2
      debian/control
  4. 0 13
      debian/dpkg.postinst
  5. 0 26
      debian/dpkg.prerm

+ 13 - 0
ChangeLog

@@ -1,3 +1,16 @@
+2006-05-15  Ian Jackson  <iwj@ubuntu.com>
+
+	* debian/control (dpkg[Depends]): Move
+	coreutils dependency to Pre-Depends and
+	depend on >= 5.93-1 to ensure that md5sum
+	is present.
+	* debian/dpkg.postinst: Don't create a
+	diversion from coreutil's md5sum.
+	* debian/dpkg.prerm: Delete the code
+	that removed the diversion generated
+	in the postinst. We rely on coreutils
+	to clean up the mess we created.
+
 2006-05-12  Frank Lichtenheld  <djpig@debian.org>
 
 	* src/main.c (ignoredepends): Fix parsing of the

+ 4 - 0
debian/changelog

@@ -24,6 +24,10 @@ dpkg (1.13.20~) UNRELEASED; urgency=low
     to -I is a absolute filename. Based on a patch by Ian Eure.
     Closes: #35573
   * Fix --ignore-depends argument value parsing. Closes: #169125
+  * Completely remove md5sum diversion madness.  Instead, we Pre-Depend
+    on a version of textutils which provides /usr/bin/md5sum.  We rely on
+    the logic in coreutils to remove our diversions. Patch by
+    Ian Jackson. Closes: #315784, #313605
 
   [ Nicolas François ]
   * fix typos in the Russian man pages. Thanks to Stepan Golosunov.

+ 1 - 2
debian/control

@@ -13,8 +13,7 @@ Build-Depends: debhelper (>= 4.1.81), pkg-config, po4a,
 Package: dpkg
 Architecture: any
 Essential: yes
-Pre-Depends: ${shlibs:Depends}
-Depends: coreutils | textutils (>= 2.0-3)
+Pre-Depends: ${shlibs:Depends}, coreutils (>= 5.93-1)
 Conflicts: sysvinit (<< 2.82-1), dpkg-iasearch (<< 0.11), dpkg-static,
  dpkg-dev (<< 1.10)
 Replaces: dpkg-doc-ja, dpkg-static, manpages-de (<= 0.4-3),

+ 0 - 13
debian/dpkg.postinst

@@ -137,18 +137,6 @@ Shall I remove these links ? [y/n] "
 }
 
 
-# Divert textutils/coreutils md5sum now that we no longer provide it
-divert_md5sum() {
-    if [ ! -f /usr/bin/md5sum ]; then
-	dpkg-divert --divert /usr/bin/md5sum --rename /usr/bin/md5sum.textutils
-    fi 
-    if [ ! -f /usr/share/man/man1/md5sum.1.gz ]; then
-	dpkg-divert --divert /usr/share/man/man1/md5sum.1.gz --rename \
-	    /usr/share/man/man1/md5sum.textutils.1.gz
-    fi
-}
-
-
 # Create log file and set default permissions if possible
 create_logfile() {
     logfile=/var/log/dpkg.log
@@ -174,7 +162,6 @@ case "$1" in
 
 	move_info_directory
 	remove_info_symlink
-	divert_md5sum
 	;;
 
     abort-upgrade|abort-deconfigure|abort-remove)

+ 0 - 26
debian/dpkg.prerm

@@ -17,31 +17,5 @@
 # Before the package is replaced due to conflict:
 #	<prerm> remove in-favour <new-package> <version>
 
-
-# Remove the md5sum diversion on removal or downgrade
-undivert_md5sum() {
-    dpkg-divert --rename --remove /usr/bin/md5sum.textutils
-    dpkg-divert --rename --remove /usr/share/man/man1/md5sum.textutils.1.gz
-}
-
-
-case "$1" in
-    remove|upgrade)
-	case "$2" in
-	    0.* | 1.[0123456789].* | 1.10 | 1.10.* | 1.13.[01234] | '')
-	        undivert_md5sum
-		;;
-	esac
-	;;
-
-    failed-upgrade|deconfigure)
-	;;
-
-    *)
-	echo "$0 called with unknown argument \`$1'" 1>&2
-	exit 1
-	;;
-esac
-
 #DEBHELPER#
 exit 0