tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: "Sören Tempel" <soeren@soeren-tempel.net>
To: tech@mandoc.bsd.lv
Subject: Discrepancy in mansearch and fs_lookup behavior
Date: Mon, 30 Aug 2021 21:26:59 +0200	[thread overview]
Message-ID: <1ZRQZL79I0W2O.3ILLDNAL4JXUP@8pit.net> (raw)

Hello!

I am currently working on rearranging the Alpine Linux POSIX and Perl
man pages to make them work properly without mandoc. For some historic
reason, Alpine presently install these as follows:

	/usr/share/man/man3/open.3pm.gz
	/usr/share/man/man3/open.3p.gz

where 3pm is the perl open man page and 3p is the POSIX open man page.
With this setup `man 3p open` will always open the Perl man page and
there seems to be no way to open the POSIX man page. Looking at the
fs_lookup implementation I believe this to be the case because mandoc
expects each section to have its own subdirectory in MANDIR. I am also
aware that OpenBSD uses the 3p section for Perl man pages which is a bit
confusing but probably Alpine's fault.

My present understanding is that this would have to be fixed on the
Alpine side by moving these man pages to their own subdirectory. Please
let me know if there is an alternative solution. While experimenting
with moving these pages, I noticed a discrepancy in the man page lookup
behavior of mansearch and fs_lookup. Assuming the above man pages are
installed as follows:

	/usr/share/man/man3/open.3pm.gz
	/usr/share/man/man3p/open.3p.gz

if a mandoc.db exists, `man 3p open` will display the Perl (open.3pm.gz)
man page (mansearch). If it doesn't (fs_lookup), it will display the
POSIX man page (open.3p.gz). I find this surprising as I would expect
the two algorithms to be equivalent. I am reporting this here as I
believe this to be a "minor bug" that doesn't interest the majority of
mandoc users.

See also: https://gitlab.alpinelinux.org/alpine/aports/-/issues/12958

Greetings,
Sören
--
 To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv


             reply	other threads:[~2021-08-30 19:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-30 19:26 Sören Tempel [this message]
2021-09-01 20:35 ` Ingo Schwarze
2021-09-02 19:09   ` Ingo Schwarze
2021-09-04 10:12   ` Sören Tempel
2021-09-04 13:18     ` Ingo Schwarze
2021-09-04 16:16       ` Ingo Schwarze
2021-09-04 17:51         ` Sören Tempel
2021-09-05 12:47           ` Ingo Schwarze

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=1ZRQZL79I0W2O.3ILLDNAL4JXUP@8pit.net \
    --to=soeren@soeren-tempel.net \
    --cc=tech@mandoc.bsd.lv \
    /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.
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).