Bug 1296692 - Idea: symlink /usr/share/zsh/OLDVERSION to /usr/share/zsh/NEWVERSION
Summary: Idea: symlink /usr/share/zsh/OLDVERSION to /usr/share/zsh/NEWVERSION
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: zsh
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: James Antill
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-07 21:12 UTC by Jason Tibbitts
Modified: 2016-03-24 17:20 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-24 09:21:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jason Tibbitts 2016-01-07 21:12:18 UTC
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.

Comment 1 Kamil Dudka 2016-01-07 21:29:50 UTC
What would be the benefit of installing versioned directories at all if they were symlinked with each other?

Comment 2 Jason Tibbitts 2016-01-07 21:31:30 UTC
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.

Comment 3 Kamil Dudka 2016-01-07 21:39:33 UTC
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?

Comment 4 Jason Tibbitts 2016-01-07 23:04:37 UTC
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.

Comment 5 Kamil Dudka 2016-01-08 18:04:35 UTC
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).

Comment 6 Jan Kurik 2016-02-24 14:14:44 UTC
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:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 7 Kamil Dudka 2016-03-24 09:21:29 UTC
The directories are versioned for a reason.  It makes no sense to symlink them with each other.

Comment 8 Jason Tibbitts 2016-03-24 17:20:27 UTC
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".


Note You need to log in before you can comment on or make changes to this bug.