Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Does mandir get saved some place?




06.08.2017, 20:57, "Jim" <linux.tech.guy@xxxxxxxxx>:
> Nikolay,
>
> On Sun, Aug 6, 2017 at 4:48 AM, Nikolay Aleksandrovich Pavlov (ZyX) <
> kp-pav@xxxxxxxxx> wrote:
>
>>  Wondering why do you install different zsh versions with one prefix? This
>>  would need some hacks like moving mandir you mentioned.
>
> Simple answer, by default this is what happens when you build zsh. Zsh
> has this "self protection system" built into the the build and install, so
> it
> doesn't overwrite unless your building the "same version". So, for
> someone new to the zsh build process, they can just checkout and build
> another version and each version will work. All by default and all with the
> /usr/local/ prefix. May not be the best way, and it is not the only way,
> but it
> appears to be the default way. You don't need man pages to "run" any
> version of zsh. They are nice to have when needed.
>
> After 30+ years of system administration(UNIX/Linux) on multi user
> systems, I view things from the point of view of how this would best work
> for all users on that system. Old habits are sometimes hard to break.
>
>>  For testing purposes I usually just compile with prefix
>>  `~/.local-${app}[-${app_version}]`, this way each application is
>>  installed into its own directory and additionally does not need superuser
>>  rights for installation or creating a package. For system-wide
>>  installations there is /opt which may be used for this purpose.
>
> Like most things with UNIX/Linux there are any number of ways of doing this.
> Some may be better or worst then others for one reason or another, but will
> still work. Ask 12 people how they do it, and you are likely to get 12
> answers
> and or at least 12 variants of the same answer.
>
>>  Of course, if you need all zsh’s available at once you will need to remove
>>  `zsh` executable, keeping only `zsh-{version}` and modify $PATH, either in
>>  .zshrc or in some place like /etc/env.d.
>
> Not sure I understand what you are saying here, or at least why you need
> to remove the `zsh` executable. I have to assume you are not talking about
> removing /bin/zsh. I guess I'm looking at it from a slightly different
> point of
> view. Having only one `zsh` is not a bad idea.

When you build zsh you have two executables installed as a result: `zsh` and `zsh-${ZSH_VERSION}`. If you have more then one zsh version then when you run `zsh` obviously only one of `zsh`s wins. But if you have different zsh version installed with the same prefix then whatever is the last zsh version you installed will overwrite `zsh` executable and you will thus somehow need to counter that. With /bin/zsh and /usr prefix it is logical to just remove /usr/bin/zsh. With zsh-version-specific prefixes there are other options, I normally just use separate testing environments (i.e. test zsh will not appear in $PATH up until I want to do some testing).

I would not be surprised to know that there is some configure option after which executable is simply not installed though, I just never needed to find it.

>
>>  This variant is also more universal: not all software uses its version in
>>  its paths.
>
> One of many reasons I love zsh.
>
>>  Alternative is making “a unique path for each version” be computable based
>>  on `$ZSH_VERSION`, in any case even if new variable is created it will be
>>  only available in new zsh versions.
>
> True. Sadly, but true. But I think there is a different way to approach
> this.
> Just need to think about this for a while.
>
> Useful discussion, thanks.
>
> Jim



Messages sorted by: Reverse Date, Date, Thread, Author