Bug#155849: dpkg: Programs misbehave when called through alternatives. Proposal to change symlinks to scripts
If /etc/alternatives/editor points to /usr/bin/jemacs, which is a link
to /usr/bin/joe meant to call joe with emacs key bindings, then whenever
"editor" is invoked joe will come up with its default behaviour (no emacs
This is, of course, due to the fact that the final binary receives the
first name used in the symlink chain, which was "editor". The only way
to break this flow seems to be to have an explicit call to the alternative
(jemacs) somewhere in the chain.
This minor breakage in the alternatives system usefulness could be
overcome by turning /etc/alternatives into a script farm instead of the
symlink farm it is now. Instead of re-linking /etc/alternatives/editor
to the chosen item (/usr/bin/jemacs), update-alternatives would perform
simple one-line edits, through sed, on the /etc/alternatives/editor script,
changing 'exec vi "$@"' to 'exec jemacs "$@"'.
Thanks for your time.
-- System Information
Debian Release: testing/unstable