Red Hat Bugzilla – Bug 1296692
Idea: symlink /usr/share/zsh/OLDVERSION to /usr/share/zsh/NEWVERSION
Last modified: 2016-03-24 13:20:27 EDT
When zsh is upgraded, existing shells have trouble because their FPATH refers to a directory which doesn't exist, and many functions are missing. This could be alleviated by simply dropping in a symlink from, say, /usr/share/zsh/5.1.1 to /usr/share/share/zsh/5.2. Yes, the new code might not be compatible, or might introduce bugs, but I think this would be rare enough that it would be the lesser of two evils.
Unfortunately replacing a directory with a symlink is not particularly pleasant, but there are some not terribly difficult fixes in https://fedoraproject.org/wiki/Packaging:Directory_Replacement
Anyway, I will be happy to implement this if the zsh package maintainers think it's a good idea.
What would be the benefit of installing versioned directories at all if they were symlinked with each other?
I have no idea what the benefit is. I suppose it's an upstream convention which we simply follow in the case that they want multiple versions installed in parallel. I don't think it gets us anything besides the annoying "shell is broken" issues when an update is pushed.
If we agreed that versioned directories are not useful for us, would not it be easier to just rename the directory such that it does not contain the version?
Perhaps; I don't know if that requires patching the source, and then whether the maintenance overhead is worth it. It seems to add the versioned directory to $fpath automatically.
Alternately, we could keep the versioned directory but also add a symlink for the major (or major.minor) version and use that in fpath so that most upgrades aren't so disruptive.
For a random data point, MacOS homebrew doesn't use the versioned directory, and INSTALL actually says it's fine to not using the versioned directory if only one version of zsh is installed at a time.
But people on #zsh are openly hostile to even talking about it, so maybe it's not a good idea. Plus there is the issue of the dlopened files in /usr/%libdir/zsh/. So, maybe it isn't worth considering and I should probably just close this as a pointless waste of the reader's time.
In my opinion, a proper solution to the above issues is to avoid updating zsh to a newer upstream version in already released versions of Fedora. Actually, this has not happened since zsh-5.0.8.
If someone updates Fedora Rawhide, or upgrades Fedora to a newer release, such intermittent problems in already running sessions of zsh are IMO expected (and in many cases unavoidable).
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.
More information and reason for this action is here:
The directories are versioned for a reason. It makes no sense to symlink them with each other.
Yes this is 100% true, and I should have closed the bug ages ago.
In case someone happens to come upon this while searchintg, all of you have to do anyway is type "exec zsh".