Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] texlive-bin profile script corrupts MANPATH
@ 2022-10-07 20:24 ahesford
  2022-10-07 21:27 ` balejk
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ahesford @ 2022-10-07 20:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]

New issue by ahesford on void-packages repository

https://github.com/void-linux/void-packages/issues/39797

Description:
The additon of `MANPATH` to `/etc/profile.d/texlive.sh` in https://github.com/void-linux/void-packages/commit/37e10282c3e7af286bea3aabb7ad4445ccd7de77 breaks completions for `man` in `zsh`. Previously, `MANPATH` was not set in the environment, which means that `zsh` looks for completions in default locations and finds everything in `/usr/share/man`. However, the new behavior results in `MANPATH=:/opt/texlive/2022/texmf-dist/doc/man`, which means `zsh` will **only** search in the listed directory. Note, also, the leading `:` which results from failing to check whether `MANPATH` is empty before appending the TeXLive path.

I'm not sure what the right fix is, but I guess my prefence would be something like
```sh
[ -n "${MANPATH}" ] && MANPATH="${MANPATH}:/opt/texlive/2022/texmf-dist/doc/man"
```
This will leave `MANPATH` blank by default and leave TL out of the search path, but I suspect that it's generally preferrable to find the system manual pages via tab completion instead of only showing TL pages. The user can always opt into TL manpages by defining a non-zero `MANPATH` in, *e.g.*, `/etc/environment` or a preceding file in `/etc/profile.d`.

cc: @leahneukirchen @balejk 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: texlive-bin profile script corrupts MANPATH
  2022-10-07 20:24 [ISSUE] texlive-bin profile script corrupts MANPATH ahesford
@ 2022-10-07 21:27 ` balejk
  2022-10-07 22:58 ` classabbyamp
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: balejk @ 2022-10-07 21:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 772 bytes --]

New comment by balejk on void-packages repository

https://github.com/void-linux/void-packages/issues/39797#issuecomment-1272100037

Comment:
For information on why the leading colon is intended, please see the [pull request](https://github.com/void-linux/void-packages/pull/36832) which introduced this. I discovered that there is a problem with the completion after this got merged and I [reported it upstream](https://www.zsh.org/mla/workers/2022/msg00562.html) where it was subsequently fixed.

However it seems that there has been no zsh release since then and thus the version in the Void repositories does not contain the fix. I have opened a [pull request](https://github.com/void-linux/void-packages/pull/39798) to backport the patch, would you please test it?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: texlive-bin profile script corrupts MANPATH
  2022-10-07 20:24 [ISSUE] texlive-bin profile script corrupts MANPATH ahesford
  2022-10-07 21:27 ` balejk
@ 2022-10-07 22:58 ` classabbyamp
  2022-10-07 23:35 ` ahesford
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: classabbyamp @ 2022-10-07 22:58 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

New comment by classabbyamp on void-packages repository

https://github.com/void-linux/void-packages/issues/39797#issuecomment-1272145953

Comment:
with mdocml, an empty item in $MANPATH (like texlive does currently) is substituted by the default MANPATH, so the current texlive profile script is valid unless MANPATH is otherwise set before it

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: texlive-bin profile script corrupts MANPATH
  2022-10-07 20:24 [ISSUE] texlive-bin profile script corrupts MANPATH ahesford
  2022-10-07 21:27 ` balejk
  2022-10-07 22:58 ` classabbyamp
@ 2022-10-07 23:35 ` ahesford
  2022-10-08  0:27 ` ahesford
  2022-10-08  0:27 ` [ISSUE] [CLOSED] " ahesford
  4 siblings, 0 replies; 6+ messages in thread
From: ahesford @ 2022-10-07 23:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 506 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/issues/39797#issuecomment-1272160714

Comment:
The `man` command definitely works even when the completions fail, but I didn't think the `mdocml` manual page was particularly clear. Its description of MANPATH made me believe it might abandon defaults or the configuration file when the environment variable was set.

I'll test the zsh fix and, if that solves the completion problem, we can merge the patch.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ISSUE] [CLOSED] texlive-bin profile script corrupts MANPATH
  2022-10-07 20:24 [ISSUE] texlive-bin profile script corrupts MANPATH ahesford
                   ` (3 preceding siblings ...)
  2022-10-08  0:27 ` ahesford
@ 2022-10-08  0:27 ` ahesford
  4 siblings, 0 replies; 6+ messages in thread
From: ahesford @ 2022-10-08  0:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1324 bytes --]

Closed issue by ahesford on void-packages repository

https://github.com/void-linux/void-packages/issues/39797

Description:
The additon of `MANPATH` to `/etc/profile.d/texlive.sh` in https://github.com/void-linux/void-packages/commit/37e10282c3e7af286bea3aabb7ad4445ccd7de77 breaks completions for `man` in `zsh`. Previously, `MANPATH` was not set in the environment, which means that `zsh` looks for completions in default locations and finds everything in `/usr/share/man`. However, the new behavior results in `MANPATH=:/opt/texlive/2022/texmf-dist/doc/man`, which means `zsh` will **only** search in the listed directory. Note, also, the leading `:` which results from failing to check whether `MANPATH` is empty before appending the TeXLive path.

I'm not sure what the right fix is, but I guess my prefence would be something like
```sh
[ -n "${MANPATH}" ] && MANPATH="${MANPATH}:/opt/texlive/2022/texmf-dist/doc/man"
```
This will leave `MANPATH` blank by default and leave TL out of the search path, but I suspect that it's generally preferrable to find the system manual pages via tab completion instead of only showing TL pages. The user can always opt into TL manpages by defining a non-zero `MANPATH` in, *e.g.*, `/etc/environment` or a preceding file in `/etc/profile.d`.

cc: @leahneukirchen @balejk 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: texlive-bin profile script corrupts MANPATH
  2022-10-07 20:24 [ISSUE] texlive-bin profile script corrupts MANPATH ahesford
                   ` (2 preceding siblings ...)
  2022-10-07 23:35 ` ahesford
@ 2022-10-08  0:27 ` ahesford
  2022-10-08  0:27 ` [ISSUE] [CLOSED] " ahesford
  4 siblings, 0 replies; 6+ messages in thread
From: ahesford @ 2022-10-08  0:27 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

New comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/issues/39797#issuecomment-1272176670

Comment:
Fixed with https://github.com/void-linux/void-packages/commit/5a5c82742343f3c4a68a41dd5f470b3b3fba6a3a, thanks!

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-08  0:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-07 20:24 [ISSUE] texlive-bin profile script corrupts MANPATH ahesford
2022-10-07 21:27 ` balejk
2022-10-07 22:58 ` classabbyamp
2022-10-07 23:35 ` ahesford
2022-10-08  0:27 ` ahesford
2022-10-08  0:27 ` [ISSUE] [CLOSED] " ahesford

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).