Mail archive

Re: [alpine-aports] [PATCH] main/mdocml: use a cron instead of a trigger to invoke makewhatis(8)

From: Natanael Copa <>
Date: Wed, 12 Aug 2015 15:05:43 +0200

On Wed, 12 Aug 2015 14:31:56 +0200
Sören Tempel <> wrote:

> On 12.08.15, Natanael Copa wrote:
> > I am not sure I like this. How much does it slow things down? are we
> > talking about 1-2 seconds or 2 minutes?
> I have 10488 man pages installed:
> 0m37.73s real 0m0.00s user 0m0.00s system

ok, 38 sec is not acceptable.

> > The way i think, the index is only needed to be created once, not every
> > night.
> If a new man page gets added to /usr/share/man the index needs to be
> rebuild so it is a good idea to invoke makewhatis(8) automatically in a
> certain interval. I think invoking it every night is a good interval.

But you only add things to /usr/share/man when you apk add?

> > If you can wait til tomorrow for using it, then you will most likely
> > not need it at all.
> That's not true at all. The index is created on install already, it's
> only updated at night.

How is it created on install if there are no trigger?

> > so i wonder if we should simply move makewhatis and db and all to a
> > subpackage and have the trigger there.
> I kind of dislike that idea since it doesn't solve the problem that it
> takes ages to install packages containing manpages than.

You can use man pages without mandoc.db since mdocml-1.13.3.

> Changes in version 1.13.3, released on March 13, 2015
> * Use this to always provide man(1), even without database support.

Pages are showed perfectly fine, but you do get a warning on exit:

ncdev-edge-x86_64:~/aports/main/mdocml$ sudo apk add man-pages
(1/1) Installing man-pages (4.02-r0)
Executing mdocml-1.13.3-r4.trigger
OK: 435 MiB in 134 packages
ncdev-edge-x86_64:~/aports/main/mdocml$ man 2 read
ncdev-edge-x86_64:~/aports/main/mdocml$ sudo rm /usr/share/man/mandoc.db
ncdev-edge-x86_64:~/aports/main/mdocml$ man 2 read
/usr/share/man/mandoc.db: No such file or directory
man: outdated mandoc.db lacks read(2) entry,
     consider running # makewhatis /usr/share/man

Other option would be to run it in background:

    /usr/sbin/makewhatis -a -T utf8 /usr/share/man &


Received on Wed Aug 12 2015 - 15:05:43 UTC