[Pkg-zsh-devel] Bug#707760: zsh: Alternatives broken for long time during upgrade from zsh4 to zsh5

Sven Joachim svenjoac at gmx.de
Thu Oct 9 18:01:39 UTC 2014


On 2014-10-09 18:12 +0200, Axel Beckert wrote:

> Sven Joachim wrote:
>> > A few rough ideas to make this easier for the user:
>> >
>> > * Use Pre-Depends in zsh + zsh-common relationship
>> > * Maybe add some hack in the preinst script
>> 
>> How about adding a symlink /bin/zsh4 -> zsh5 in the zsh package?  Not
>> extremely pretty, but it should work.
>
> What about putting a shell script at /bin/zsh4 which more or less
> looks this?
>
>   #!/bin/sh
>   
>   echo "$0 is deprecated, please switch to /bin/zsh or /usr/bin/zsh" 1>&2
>   exec /bin/zsh5 "$@"
>
> Or maybe even
>
>   #!/bin/sh
>   set -e
>   
>   echo "$0 is deprecated, please switch to /bin/zsh or /usr/bin/zsh" 1>&2
>   /bin/zsh5 "$@"
>   exit 1
>
> Main reason why I currently prefer this over the pure symlink is that
> don't want people to continue to use /bin/zsh4 just because it still
> exists.

Might be an idea, somebody once suggested[1] to make /bin/zsh4 root's
login shell…

> And adding a symlink to package and then removing it in postinst is
> probably far too evil and will make piuparts, debsums and maybe even
> the policy cry out loudly.
>
> A variant of that is possibly to always divert that link away in
> postinst, but then again, that's probably overkill. And I have no idea
> where to divert it to.

Neither of these options seem any good to me.

Cheers,
       Sven


1. http://forums.debian.net/viewtopic.php?f=16&t=52416#p302327



More information about the Pkg-zsh-devel mailing list