That strictness will break things for quite a lot of packages.
-- Sent from a phone, apologies for poor formatting. On 24 May 2022 08:58:46 "Matthew King" <cho...@jtan.com> wrote:
While writing some documentation I noticed backup files turning up in my mandoc.db and chased it down to what appears to be an oversight when checking filename extensions in makewhatis. The current behaviour allows anything to follow the section name part of each page's filename. Perhaps this is to allow compressed manpages but I couldn't find any overt reference to such a feature in mandoc's documentation but rather it seemed to imply that the section in the filename must exactly match that in the directory name: The mandoc.db(5) database is used for looking up manual page entries. In cases where the database is absent, outdated, or corrupt, man falls back to looking for files called name.section. And By default, makewhatis creates a database in each dir using the files mansection/[arch/]title.section and catsection/[arch/]title.0 in that directory. The included patch fixes my issue by warning and rejecting a backup file alongside a manpage's source but does so by changing the behaviour of makewhatis to reject all files (by default) without a precisely matching section name. I did not check filescan thoroughly enough to determine for sure whether it would also need a similar change but it doesn't look like it. I'm also not sure that I've got the indentation right. Cheers, Matthew ps. The diff is not included inline to avoid copy pasta issues as I have an unrelated problem which forces me to post through webmail.