Package: debianutils
Version: 4.4
Severity: normal
Tags: patch
User: [email protected]
Usertags: usrmerge

The package installs a symbolic link and a file with the same name in
both /bin/ and /usr/bin/, so it makes impossible to convert a system
to the everything-in-usr directories scheme.

The attached patch solves this problem by creating the link in postinst
and only if it is needed.

For more information about everything-in-usr please read
http://anonscm.debian.org/cgit/users/md/usrmerge.git/tree/debian/README.Debian

-- 
ciao,
Marco
diff -urNp debianutils-4.4/debian/debianutils.postinst debianutils-4.4+nmu1/debian/debianutils.postinst
--- debianutils-4.4/debian/debianutils.postinst	1970-01-01 01:00:00.000000000 +0100
+++ debianutils-4.4+nmu1/debian/debianutils.postinst	2014-11-02 02:00:22.920052948 +0100
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = 'configure' -a ! -e '/usr/bin/which' ]; then
+  ln -s /bin/which /usr/bin/which
+fi
+
+#DEBHELPER#
diff -urNp debianutils-4.4/debian/debianutils.postrm debianutils-4.4+nmu1/debian/debianutils.postrm
--- debianutils-4.4/debian/debianutils.postrm	1970-01-01 01:00:00.000000000 +0100
+++ debianutils-4.4+nmu1/debian/debianutils.postrm	2014-11-02 02:00:48.024456515 +0100
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = 'remove' -a -L '/usr/bin/which' ]; then
+  rm /usr/bin/which
+fi
+
+#DEBHELPER#
diff -urNp debianutils-4.4/debian/rules debianutils-4.4+nmu1/debian/rules
--- debianutils-4.4/debian/rules	2013-07-28 03:30:26.000000000 +0200
+++ debianutils-4.4+nmu1/debian/rules	2014-11-02 01:59:19.507032220 +0100
@@ -73,9 +73,6 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_
 	   	debian/tmp/usr/bin/ischroot
 endif
 
-ifneq ($(DEB_HOST_ARCH_OS),hurd)
-	ln -s /bin/which debian/tmp/usr/bin/which
-endif
 ifeq ($(DEB_HOST_ARCH_OS),linux)
 	mv debian/tmp/usr/sbin/installkernel debian/tmp/sbin/
 else

Attachment: signature.asc
Description: Digital signature

Reply via email to