[Pkg-zsh-devel] Bug#707760: zsh: Alternatives broken for long time	during upgrade from zsh4 to zsh5
    Axel Beckert 
    abe at debian.org
       
    Thu Oct  9 16:12:04 UTC 2014
    
    
  
Hi Sven,
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.
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.
> In the long run, /{usr,}/bin/zsh should probably not be handled by
> alternatives anymore since the zsh-beta package is gone,
Definitely.
> but now might not be the best time to implement this.
Yep.
		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe at debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-    |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
    
    
More information about the Pkg-zsh-devel
mailing list