zsh-users
 help / color / mirror / code / Atom feed
From: "Nikolay Aleksandrovich Pavlov (ZyX)" <kp-pav@yandex.ru>
To: "linuxtechguy@gmail.com" <linuxtechguy@gmail.com>,
	"zsh-users@zsh.org" <zsh-users@zsh.org>
Subject: Re: Does mandir get saved some place?
Date: Sun, 06 Aug 2017 23:13:01 +0300	[thread overview]
Message-ID: <1278851502050381@web53g.yandex.ru> (raw)
In-Reply-To: <CA+rB6GJ9ACcQHrEtDTgXxih8jnF-wAkrcAXNsBWQ8zLp8taMyQ@mail.gmail.com>



06.08.2017, 20:57, "Jim" <linux.tech.guy@gmail.com>:
> Nikolay,
>
> On Sun, Aug 6, 2017 at 4:48 AM, Nikolay Aleksandrovich Pavlov (ZyX) <
> kp-pav@yandex.ru> 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


  reply	other threads:[~2017-08-06 20:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-03 15:01 Jim
2017-08-06  1:00 ` Nikolay Aleksandrovich Pavlov (ZyX)
     [not found]   ` <CA+rB6GLYMUyzO=c5P=FLSyhS15JUQW8-naRWzfc73fovAJQ3hQ@mail.gmail.com>
2017-08-06  6:37     ` Fwd: " Jim
2017-08-06  9:48       ` Nikolay Aleksandrovich Pavlov (ZyX)
2017-08-06 17:55         ` Jim
2017-08-06 20:13           ` Nikolay Aleksandrovich Pavlov (ZyX) [this message]
2017-08-06 11:02 ` Bart Schaefer
2017-08-06 19:20   ` Jim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1278851502050381@web53g.yandex.ru \
    --to=kp-pav@yandex.ru \
    --cc=linuxtechguy@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).