From: Ingo Schwarze <schwarze@usta.de> To: sternenseemann@systemli.org Cc: tech@mandoc.bsd.lv Subject: Re: [PATCH makewhatis] add NIXSTOREDIR configuration variable to support NixOS Date: Tue, 30 Mar 2021 22:30:20 +0200 [thread overview] Message-ID: <20210330203020.GA94101@athene.usta.de> (raw) In-Reply-To: <8bce7cc9-954e-1c28-ee25-13969f66eb20@systemli.org> Hi Lukas, Earendil wrote on Tue, Mar 30, 2021 at 09:49:49PM +0200: > On NixOS there is a similar situation as with Hombrew: The actual > man pages are installed into custom prefixes for each package under > /nix/store and then symlinked to in the global share/man directory > (which is /run/current-system/sw/share/man for NixOS). This of course > makes makewhatis skip every installed man page when indexing because > /nix/store is considered outside of the man directory. Uh oh. I must admit i found this "cellar" concept so weird and unusual that i didn't anticipate any other system doing anything similar, and hence the overly specific naming of the feature. Then again, if i read the commit logs correctly, it did take six years until the second system (among about two dozen being actively maintained) turned up that uses such a method... > To fix this issue I've followed the implementation of HOMEBREWDIR. The > drawback of this being that more or less the same code is duplicated for > this purpose. However there may be a (arguably very small) group of > users who would possibly want to use both configuration variables at the > same time as the nix package manager can also be installed on macOS, but > it would probably also not do any harm merging the two variables into one. Indeed. Using two package managers on the same machine at the same time is no doubt a recipe for disaster, and i expect getting the manual pages indexed will be the least of your worries... So i'm not really convinced having *two* such variables with identical functionality makes anything better. Would simply setting HOMEBREWDIR=/nix/store be OK with you? We could of course rename the variable to something more generic, *if* a generic name for this concepts exists or can be invented in a reasonable way. > This patch is necessary to provide a mandoc-based alternative to the > current documentation.man module in NixOS which uses GNU's man-db > package. I have a working implementation of this (using a cvs version of > mandoc with this patch applied) here: Nice. :-) > https://github.com/openlab-aux/vuizvui/blob/master/modules/user/sternenseemann/documentation/mandoc.nix To speed up the reply - i caused enough delay already - i refrained from studying your code so far. > A side note: During testing I haven't been able to trigger the code path > of the ifdef in filescan. I've added it anyways because HOMEBREWDIR also > has been added there, but didn't seem to be a situation where basedir is > set and filescan is called, but maybe I missed something. To reach the filescan() function, you need to call makewhatis with the -d, -u, or -t option. Unless i misunderstand my own code (after it required little maintenance effort for a number of years), using -d or -u will indeed frst call set_basedir() and then filescan() shortly afterwards, see the function mandocdb() in the file mandocdb.c. Yours, Ingo -- To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv
next prev parent reply other threads:[~2021-03-30 20:30 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-30 19:49 sternenseemann 2021-03-30 20:30 ` Ingo Schwarze [this message] 2021-03-30 21:03 ` sternenseemann 2021-03-31 17:34 ` Ingo Schwarze 2021-03-31 19:33 ` sternenseemann 2021-04-10 15:57 ` [PATCH v2 makewhatis] refactor HOMEBREWDIR into READ_ALLOWED_PATH sternenseemann 2021-04-10 16:15 ` sternenseemann 2021-08-03 16:42 ` sternenseemann 2021-08-05 12:35 ` Ingo Schwarze 2021-08-07 0:29 ` sternenseemann 2021-08-07 13:17 ` 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=20210330203020.GA94101@athene.usta.de \ --to=schwarze@usta.de \ --cc=sternenseemann@systemli.org \ --cc=tech@mandoc.bsd.lv \ --subject='Re: [PATCH makewhatis] add NIXSTOREDIR configuration variable to support NixOS' \ /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
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).