From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 534 invoked from network); 30 Mar 2021 21:04:05 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 30 Mar 2021 21:04:05 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id c4eedc6b for ; Tue, 30 Mar 2021 16:04:01 -0500 (EST) Received: from mail1.systemli.org (mail1.systemli.org [212.103.72.247]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 167199e0 for ; Tue, 30 Mar 2021 16:03:59 -0500 (EST) Subject: Re: [PATCH makewhatis] add NIXSTOREDIR configuration variable to support NixOS DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=systemli.org; s=default; t=1617138237; bh=VOPMGscZVM4pi0dFa3/b0jo4btaEG/YHHLscfJOcljE=; h=Subject:To:References:From:Date:In-Reply-To:From; b=0M1Cz68I2BKtvf4Xk7SfmvHR8iWpNNyJgkLHFnY6ClNKdxW/KINMKLGP2rNtw+zaJ JK6VreK9hsKLMmimEXHKC/eNw57lhOznjdfkJ2BitlrPdY0sEYmSJ94em5wY1O0K5b pEFz/krDrnWS19I3rtOteGAOSZc4nKkgM3k761bjzvdB6ZBOysi3lH50NPc+1gfEdM JpvFqNr67O7yPRPQiCypxdIsMo9cWL1Pgptbajn/bzvNCOB1qdNaCJuGGdh+19C7HX sL2VOwWkxlkkg2weL+JpIBl2aYG1PA2DuARtxfMdC4V0hmd3N0CgZ40KDrNNcdnwn2 HxaR3Z1eFKduA== To: tech@mandoc.bsd.lv References: <8bce7cc9-954e-1c28-ee25-13969f66eb20@systemli.org> <20210330203020.GA94101@athene.usta.de> From: sternenseemann Message-ID: <060f9222-a388-a9fa-dc34-8f1981f8bf65@systemli.org> Date: Tue, 30 Mar 2021 23:03:53 +0200 X-Mailinglist: mandoc-tech Reply-To: tech@mandoc.bsd.lv MIME-Version: 1.0 In-Reply-To: <20210330203020.GA94101@athene.usta.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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