Re: git: 9a5a5a037897 - main - japanese/kterm: Sanitize MANPREFIX

From: Moin Rahman <bofh_at_freebsd.org>
Date: Mon, 22 Jan 2024 21:43:43 UTC

> On Jan 22, 2024, at 10:36 PM, Hiroki Sato <hrs@freebsd.org> wrote:
> 
> Moin Rahman <bofh@freebsd.org> wrote
>  in <372CB45E-1608-41D9-B43F-8D2BE834C68E@freebsd.org>:
> 
> bo>
> bo>
> bo> > On Jan 22, 2024, at 10:00 PM, Hiroki Sato <hrs@freebsd.org> wrote:
> bo> >
> bo> > Muhammad Moinur Rahman <bofh@FreeBSD.org> wrote
> bo> >  in <202401222027.40MKRVaH012805@gitrepo.freebsd.org>:
> bo> >
> bo> > bo> The branch main has been updated by bofh:
> bo> > bo>
> bo> > bo> URL: https://cgit.FreeBSD.org/ports/commit/?id=9a5a5a0378972be4f6b9d4d4c67c68baaebb1daa
> bo> > bo>
> bo> > bo> commit 9a5a5a0378972be4f6b9d4d4c67c68baaebb1daa
> bo> > bo> Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
> bo> > bo> AuthorDate: 2024-01-22 19:37:27 +0000
> bo> > bo> Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
> bo> > bo> CommitDate: 2024-01-22 20:26:42 +0000
> bo> > bo>
> bo> > bo>     japanese/kterm: Sanitize MANPREFIX
> bo> > bo>
> bo> > bo>     Approved by:    portmgr (blanket)
> bo> >
> bo> > ...
> bo> >
> bo> > bo> -man/ja.UTF-8/man1/kterm.1.gz
> bo> > bo> -man/man1/kterm.1.gz
> bo> > bo> +share/man/ja/man1/kterm.1.gz
> bo> > bo> +share/man/man1/kterm.1.gz
> bo> >
> bo> > Why does ja.UTF-8 need to be replaced with ja?  The man(1) utility
> bo> > searches man/<lang_country.charset> and man/<lang.charset>, not
> bo> > man/<lang>.
> bo> >
> bo> > -- Hiroki
> bo>
> bo> That's only applicable for base. Apart from that and ${PREFIX}/man
> bo> and ${PREFIX}/share/man everything has to be added to the MANPATH.
> 
> You mean ${PREFIX}/share/man/ja needs to be added to MANPATH manually?
> 
> ja.UTF-8 just works even for /usr/local by default as far as I can
> check.  I got the following when entering "man -d kterm" and there is
> /usr/local/share/man/ja.UTF-8 and LANG=ja_JP.UTF-8:
> 
> -- Using architecture: amd64:amd64
> -- Using pager: less
> -- Searching PATH for man directories
> --   Adding /usr/share/man to manpath
> --   Adding /usr/local/share/man to manpath
> --   Adding /usr/local/man to manpath
> -- Adding default manpath entries
> --   Adding /usr/share/openssl/man to manpath
> -- Parsing config file: /usr/local/etc/man.d/perl5.conf
> --   Adding /usr/local/lib/perl5/site_perl/man to manpath
> --   Adding /usr/local/lib/perl5/5.36/perl/man to manpath
> -- Using manual path: /usr/share/man:/usr/local/share/man:/usr/local/man:/usr/share/openssl/man:/usr/local/lib/perl5/site_perl/man:/usr/local/lib/perl5/5.36/perl/man
> -- Using manual sections: 1:8:2:3:3lua:n:4:5:6:7:9:l
> -- Using locale paths: ja_JP.UTF-8:ja.UTF-8:en.UTF-8:.
> -- Using standard page width
> -- Searching for "kterm"
> --     Found manpage "/usr/local/share/man/ja.UTF-8/man1/kterm.1.gz"
> --     Skipping catpage: not found or old
> -- Command: /usr/bin/gzcat "/usr/local/share/man/ja.UTF-8/man1/kterm.1.gz" | mandoc  | less
> 
> And the following when there is /usr/local/share/man/ja and
> LANG=ja_JP.UTF-8:
> 
> -- Using architecture: amd64:amd64
> -- Using pager: less
> -- Searching PATH for man directories
> --   Adding /usr/share/man to manpath
> --   Adding /usr/local/share/man to manpath
> --   Adding /usr/local/man to manpath
> -- Adding default manpath entries
> --   Adding /usr/share/openssl/man to manpath
> -- Parsing config file: /usr/local/etc/man.d/perl5.conf
> --   Adding /usr/local/lib/perl5/site_perl/man to manpath
> --   Adding /usr/local/lib/perl5/5.36/perl/man to manpath
> -- Using manual path: /usr/share/man:/usr/local/share/man:/usr/local/man:/usr/share/openssl/man:/usr/local/lib/perl5/site_perl/man:/usr/local/lib/perl5/5.36/perl/man
> -- Using manual sections: 1:8:2:3:3lua:n:4:5:6:7:9:l
> -- Using locale paths: ja_JP.UTF-8:ja.UTF-8:en.UTF-8:.
> -- Using standard page width
> -- Searching for "kterm"
> --     Found manpage "/usr/local/share/man/man1/kterm.1.gz"
> --     Skipping catpage: not found or old
> -- Command: /usr/bin/gzcat "/usr/local/share/man/man1/kterm.1.gz" | mandoc  | less
> 
> This is the reason why I changed the pathname from ja to ja.UTF-8 in
> the previous commit.  Am I missing something?
Am not sure. I might be wrong too as haven't played with locales for a while.

But as like as other commits in these batches the primary purpose was to
move man pages to share. And this was secondary issue.

So if you are confident feel free to switch back but keeping everything
under ${PREFIX}/share/man.

Kind regards,
Moin

> -- Hiroki