Package: less Version: 458-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/less.postinst b/debian/less.postinst --- a/debian/less.postinst 1970-01-01 01:00:00.000000000 +0100 +++ b/debian/less.postinst 2014-11-02 02:15:05.000000000 +0100 @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +if [ "$1" = 'configure' ]; then + for file in lessfile lesspipe lesskey lessecho less; do + if [ ! -e /usr/bin/$file ]; then + ln -s /bin/$file /usr/bin/$file + fi + done +fi + +#DEBHELPER# diff -urpN a/debian/less.postrm b/debian/less.postrm --- a/debian/less.postrm 1970-01-01 01:00:00.000000000 +0100 +++ b/debian/less.postrm 2014-11-02 02:15:11.000000000 +0100 @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +if [ "$1" = 'remove' ]; then + for file in lessfile lesspipe lesskey lessecho less; do + if [ -L /usr/bin/$file ]; then + rm /usr/bin/$file + fi + done +fi + +#DEBHELPER# diff -urpN a/debian/rules b/debian/rules --- a/debian/rules 2014-09-08 06:15:39.000000000 +0200 +++ b/debian/rules 2014-11-02 02:15:55.000000000 +0100 @@ -56,11 +56,6 @@ install: build $(MAKE) install prefix=`pwd`/debian/`dh_listpackages`/ install -m 0755 debian/lesspipe `pwd`/debian/`dh_listpackages`/bin/lesspipe ln -s lesspipe `pwd`/debian/`dh_listpackages`/bin/lessfile - ln -s /bin/lesspipe `pwd`/debian/`dh_listpackages`/usr/bin/lessfile - ln -s /bin/lesspipe `pwd`/debian/`dh_listpackages`/usr/bin/lesspipe - ln -s /bin/lesskey `pwd`/debian/`dh_listpackages`/usr/bin/lesskey - ln -s /bin/lessecho `pwd`/debian/`dh_listpackages`/usr/bin/lessecho - ln -s /bin/less `pwd`/debian/`dh_listpackages`/usr/bin/less ln -s lesspipe.1.gz `pwd`/debian/`dh_listpackages`/usr/share/man/man1/lessfile.1.gz binary-indep: build install
signature.asc
Description: Digital signature

