Package: tcsh
Version: 6.18.01-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 -u tcsh-6.18.01/debian/postinst tcsh-6.18.01/debian/postinst
--- tcsh-6.18.01/debian/postinst
+++ tcsh-6.18.01/debian/postinst
@@ -23,6 +23,10 @@
                 --install /bin/csh csh /bin/tcsh 20 \
                 --slave /usr/share/man/man1/csh.1.gz csh.1.gz /usr/share/man/man1/tcsh.1.gz
 
+        if [ ! -e '/bin/tcsh' ]; then
+            ln -s /usr/bin/tcsh /bin/tcsh
+        fi
+
         if [ -x /usr/sbin/add-shell ]; then
             add-shell /bin/tcsh /usr/bin/tcsh
         fi
diff -u tcsh-6.18.01/debian/postrm tcsh-6.18.01/debian/postrm
--- tcsh-6.18.01/debian/postrm
+++ tcsh-6.18.01/debian/postrm
@@ -26,6 +26,10 @@
             remove-shell /bin/tcsh /usr/bin/tcsh
         fi
 
+        if [ -L '/bin/tcsh' ]; then
+            rm /bin/tcsh
+        fi
+
         if [ -x /usr/bin/update-menus ]; then
             update-menus
         fi
diff -u tcsh-6.18.01/debian/rules tcsh-6.18.01/debian/rules
--- tcsh-6.18.01/debian/rules
+++ tcsh-6.18.01/debian/rules
@@ -25,8 +25,6 @@
 override_dh_auto_install:
 	dh_auto_install
 	$(MAKE) install.man DESTDIR=$(CURDIR)/debian/tcsh/
-	install -d -m 0755 debian/tcsh/bin
-	ln -s /usr/bin/tcsh debian/tcsh/bin/tcsh
 	install -d -m 0755 debian/tcsh/etc debian/tcsh/etc/csh debian/tcsh/etc/csh/login.d debian/tcsh/usr/share/doc/tcsh
 	install    -m 0644 debian/csh.cshrc debian/csh.login debian/csh.logout complete.tcsh debian/tcsh/etc
 	install -D -m 0644 csh-mode.el debian/tcsh/usr/share/emacs/site-lisp/csh-mode.el

Attachment: signature.asc
Description: Digital signature

Reply via email to