[Pkg-zsh-devel] Bug#707760: zsh: Alternatives broken for long time during upgrade from zsh4 to zsh5
Sven Joachim
svenjoac at gmx.de
Sat Oct 4 17:29:50 UTC 2014
On 2013-05-11 16:13 +0200, Axel Beckert wrote:
> Aaron Schrab wrote:
>> As far as I can tell, it's just caused by how dpkg works.
>>
>> As it's supposed to do, dpkg first unpacked the new version of zsh
>> and removed the old version along with doing the same for the other
>> packages being upgraded in that run. Only once that was done did it
>> start running the postinst scripts for the packages one by one.
>>
>> In most cases this isn't much of an issue, most packages will work
>> at least somewhat when not configured or when the configuration step
>> was done for a previous version of the package. Here since the
>> actual executable moved from /bin/zsh4 to /bin/zsh5 during the
>> unpacking phase but update-alternatives wasn't called to do its work
>> until the postinst script was run this left the /bin/zsh and
>> /usr/bin/zsh links broken during that time. Once the postinst
>> script actually ran, the problem was resolved.
>
> Yep, that came to mind, too, in the meanwhile, but I wasn't sure if
> it's just that. So thanks for this -- kind of -- confirmation.
>
>> This would likely be difficult to notice during development. Since
>> in that case it's likely that the zsh package would be upgraded by
>> itself rather than with a large number of other packages, in which
>> case there wouldn't be much of a gap between when the package is
>> unpacked and when the postinst script is run.
>
> Indeed.
There is also the rather worrisome problem that users who have zsh as
their login shell will not be able to log in during that period.
> 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.
In the long run, /{usr,}/bin/zsh should probably not be handled by
alternatives anymore since the zsh-beta package is gone, but now might
not be the best time to implement this.
Cheers,
Sven
More information about the Pkg-zsh-devel
mailing list