guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting rid of the mandb profile hook?


From: Brice Waegeneire
Subject: Re: Getting rid of the mandb profile hook?
Date: Wed, 03 Mar 2021 21:50:31 +0100
User-agent: Roundcube Webmail/1.4.11

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]