From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kHWMBLf2P2D1FgAA0tVLHw (envelope-from ) for ; Wed, 03 Mar 2021 20:51:03 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id wJtJALf2P2DRMQAAB5/wlQ (envelope-from ) for ; Wed, 03 Mar 2021 20:51:03 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AD20024CC2 for ; Wed, 3 Mar 2021 21:51:02 +0100 (CET) Received: from localhost ([::1]:37178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lHYST-0006Ia-S9 for larch@yhetil.org; Wed, 03 Mar 2021 15:51:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHYS6-0006HK-Pm for guix-devel@gnu.org; Wed, 03 Mar 2021 15:50:38 -0500 Received: from relay9-d.mail.gandi.net ([217.70.183.199]:58961) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lHYS4-0002qS-KK; Wed, 03 Mar 2021 15:50:38 -0500 X-Originating-IP: 10.200.201.19 Received: from webmail.gandi.net (webmail19.sd4.0x35.net [10.200.201.19]) (Authenticated sender: brice@waegenei.re) by relay9-d.mail.gandi.net (Postfix) with ESMTPA id A353DFF803; Wed, 3 Mar 2021 20:50:31 +0000 (UTC) MIME-Version: 1.0 Date: Wed, 03 Mar 2021 21:50:31 +0100 From: Brice Waegeneire To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: Getting rid of the mandb profile hook? In-Reply-To: <87ft1cqq94.fsf@gnu.org> References: <87k0tw3y15.fsf@inria.fr> <87v9ad7jal.fsf@gmail.com> <87ft1cqq94.fsf@gnu.org> User-Agent: Roundcube Webmail/1.4.11 Message-ID: <0170f58ece0b1bfd193f1566c37eddb8@waegenei.re> X-Sender: brice@waegenei.re Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=217.70.183.199; envelope-from=brice@waegenei.re; helo=relay9-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guix Devel , Maxim Cournoyer Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1614804662; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ZgcXqHxov7PPnrMPvcclkLUHgp/kWoHPQwAEvXjFnc0=; b=cU4GAlA5OsGZSLuKMZI2dT9ZOYQMjvewswgsB1t7ctAEh7vo2MY9Xjx8ytvLkPS4O8ztlY cIwvrY8a9Y0ad8NPRAx+99xWsjNcqF/XW8zq/U1BnGv221QsbSS2zgU1YKn3W0o7H850ls iwK2fMuMCouKbZ1xYhjm50noMN3NQjoVaRZxyDDwqZML5AXt0dCo1PmpRX2azMO2UCHXwU yA95b9PgRNVxsi4Mnt62rW8a9bMU+Ezfxk9IChqjk+/Yvky3tN/sLFLIvnxL6N9uMgMXw+ J0ra1igy9HV8ATMhEnzchhxY456d9cCdZ/1j7eC+dq5n9U8tw6F08HzcLe5HAw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1614804662; a=rsa-sha256; cv=none; b=MEveoevOmIDbzuZj3U/wK+17Dh/K08xtjkJhu6HqlmA0OTQxwZpfRlG1ZG95UasucbYTCb F/vyMBPkExn8yZIckPhhRih/qd27bMeWou3lxu1/IG5vywR0ZxffOmrH2DDcoEtDVMiKpc 4xoHi9JpXAi8O/ZI0i7UFQWfEhXxpgkaOxdPf/HhgjTdfdD5lJwypa1AimIMZWM4QUIcX0 jyoOhAxe3lKWPmY7ZyugTTQkQ01hDq5oNxcb6Q+fBeYeFE2GINd4zNxnBsHn9wBvCwp583 Ppzxy1KPicDlTURw8drI9+jf9UCmAZuvg+lx7cDJu3Doskx+5XGF+HgIdmAu9w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -1.36 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: AD20024CC2 X-Spam-Score: -1.36 X-Migadu-Scanner: scn1.migadu.com X-TUID: jiWJyVScqJYt Hello Ludovic, On 2021-03-03 15:13, Ludovic Courtès wrote: >>> I’m thinking we could get rid of the mandb hook. However, the >>> functionality matters IMO (we need good tools so users can browse >>> local >>> documentation; mandb is not that good but better than no search >>> mechanism.) Here are several options that come to mind: >>> >>> 1. Provide a ‘man’ wrapper or modify the ‘man-db’ package such that >>> the database gets built on the first use of ‘man -k’, unless >>> it’s >>> already up-to-date. >> >> That would mean the database would live in some user-specific writable >> area of the file system correct (where?), right? And could use the >> common 'update' mechanism of man-db to make it as fast as possible. >> >> This sounds good from a performance perpective, but could introduce >> cache issues every now and then (if man-db changes a lot). I wouldn't >> expect much problem given how mature man-db is, but that's one thing >> to >> consider. > > I looked a bit at man-db, thinking it must have that already done more > or less. Indeed, one can run “mandb -uc” to create the database. > > The problem is that it insists on writing databases and ‘CACHEDIR.TAG’ > files in the same directory as man pages. In our case, these are all > read-only, so just prints a warning for each directory and keeps going. > > It looks like man-db is not written with a situation like ours in mind. What about using mandoc¹, the manpage compiler from OpenBSD, instead of man-db? As from it's manual it support specifying the database location: “makewhatis -d dir [file ...]”² It isn't packaged in Guix yet, but other Linux distros have done it, some are even using it as their default. > [...] > > One option I contemplated at one point is to simply have fewer man > pages > in the first place. :-) There were packages that install man pages > when they shouldn’t. This led to commits like > 305eefc0627eb1d047e6fc4320d7e56897719ab8 and > 4b797193d7508ddc53bb1ff7a267a0d50c1fe298 (and parent commits). More outputs would be great tho having a way to force the installation of specifics outputs for every installed package would improve quality of live. For a specific example in that case, when installing ncurses from the cli it would install it's man output too if you always want man page to be installed. ¹ https://mandoc.bsd.lv/ ² https://www.mankier.com/8/makewhatis.mandoc Cheers, - Brice