tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: sternenseemann <sternenseemann@systemli.org>
To: tech@mandoc.bsd.lv
Subject: Re: [PATCH makewhatis] add NIXSTOREDIR configuration variable to support NixOS
Date: Tue, 30 Mar 2021 23:03:53 +0200	[thread overview]
Message-ID: <060f9222-a388-a9fa-dc34-8f1981f8bf65@systemli.org> (raw)
In-Reply-To: <20210330203020.GA94101@athene.usta.de>

Hi Ingo,

On 3/30/21 10:30 PM, Ingo Schwarze wrote:
> 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...

I'm pretty sure you can use both at the same time since nix wouldn't try
to write anything under /usr in that case, but even if you were using
both at the same time, makewhatis wouldn't be useful for nix, I think
since it heavily operates on a concept of a man dir it can write to.
With NixOS there is enough flexibility to integrate that, but on nix on
another distribution / OS that doesn't work as far as I'm aware.

TL;DR: I don't think this is an use case we need to support.

> 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?

Yes, absolutely! I mainly submitted the patch to get some feedback to
upstream since we would of course like to use mandoc's configuration
options in a way intended by upstream ideally :) If setting HOMEBREWDIR
sounds reasonable for you, I'm absolutely fine with it. We also don't
currently set it for macOS in our package, so this wouldn't cause any
regression.
> 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.

That would of course be nice. Mayeb something along the lines of
EXTRA_BASEDIR or SYMLINK_TARGET_EXCEPTION? Seems hard to name in a
concise way though.

> To speed up the reply - i caused enough delay already - i refrained from
> studying your code so far.

It's no matter and nothing really too interesting happens there, just
wanted to link it for reference.

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

Indeed, you still seem to understand it better than me.

cheers,

lukas
--
 To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv


  reply	other threads:[~2021-03-30 21:04 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
2021-03-30 21:03   ` sternenseemann [this message]
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=060f9222-a388-a9fa-dc34-8f1981f8bf65@systemli.org \
    --to=sternenseemann@systemli.org \
    --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).