From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 241 invoked by alias); 6 Aug 2017 20:19:18 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22796 Received: (qmail 6877 invoked by uid 1010); 6 Aug 2017 20:19:18 -0000 X-Qmail-Scanner-Diagnostics: from forward4o.cmail.yandex.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(37.9.109.248):SA:0(-0.7/5.0):. Processed in 2.825345 secs); 06 Aug 2017 20:19:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: kp-pav@yandex.ru X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1502050381; bh=Lb1NXW7XBnjgCtFzbcE1gmaOd71dPlZPuXWCUoH5stc=; h=From:To:In-Reply-To:References:Subject:Message-Id:Date; b=ROvksa2YDcMMP6vBR2McHppV8uE3yrwIe8GrCd0+T32Xjup/0J6GZvNNHnQvSZXzk wWH7B97ihmXLkZjd92VBjMTcQaFr7DIit1rPUb0ScmxeW3C/6/2GsDk4Jphg9VSLRJ FthI6ABqZmsagQIl4p2H5B5FzYtgJmq9aL8HNCVo= Authentication-Results: mxback7g.mail.yandex.net; dkim=pass header.i=@yandex.ru From: "Nikolay Aleksandrovich Pavlov (ZyX)" To: "linuxtechguy@gmail.com" , "zsh-users@zsh.org" In-Reply-To: References: <76131501981203@web60g.yandex.ru> <1603101502012908@web54j.yandex.ru> Subject: Re: Does mandir get saved some place? MIME-Version: 1.0 Message-Id: <1278851502050381@web53g.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Sun, 06 Aug 2017 23:13:01 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 06.08.2017, 20:57, "Jim" : > 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