Package: nano Version: 2.2.6-3 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 -urpN a/debian/nano.links b/debian/nano.links
--- a/debian/nano.links 2014-01-06 23:24:19.000000000 +0100
+++ b/debian/nano.links 1970-01-01 01:00:00.000000000 +0100
@@ -1 +0,0 @@
-bin/nano usr/bin/nano
diff -urpN a/debian/nano.postinst b/debian/nano.postinst
--- a/debian/nano.postinst 2014-01-06 23:24:19.000000000 +0100
+++ b/debian/nano.postinst 2014-11-02 03:40:55.000000000 +0100
@@ -11,4 +11,8 @@ if [ "$1" = "configure" ] || [ "$1" = "a
/usr/share/man/man1/nano.1.gz
fi
+if [ "$1" = 'configure' -a ! -e '/usr/bin/nano' ]; then
+ ln -s /bin/nano /usr/bin/nano
+fi
+
#DEBHELPER#
diff -urpN a/debian/nano.postrm b/debian/nano.postrm
--- a/debian/nano.postrm 1970-01-01 01:00:00.000000000 +0100
+++ b/debian/nano.postrm 2014-11-02 03:41:38.000000000 +0100
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = 'remove' -a -L '/usr/bin/nano' ]; then
+ rm /usr/bin/nano
+fi
+
+#DEBHELPER#
signature.asc
Description: Digital signature

