[Slackbuilds-users] RFC: Proposed mandb additions to doinst/douninst template

B. Watson urchlay at slackware.uk
Mon Sep 16 10:56:07 UTC 2024



On Mon, 16 Sep 2024, Duncan Roe wrote:

> D'oh! I only meant to touch *newly installed* files. Would need to run find at
> build time and append touch commands to doinst.sh.

Yeah. That wouldn't really be any simpler or better than the previous
idea (generated doinst.sh with 1 "mandb -f" command per man page).

> From strace of mandb I can see it is reading directory entries. Are you sure it
> isn't checking file modification times? I would have thought it had to.

The trouble is... it skips the entire directory if the timestamp on
the dir is older than the database for that dir. Touching just the
directories forces it to at least look in all the dirs. If it finds a
man page that's not indexed, it'll add it (regardless of timestamp on
the man page, it looks like).

I guess you still might run into a situation where you had a package
installed, upgraded it, and it has the same man page files, but the
files have different descriptions in the new version. I think in that
case, "mandb -k" would still show the old version's description. This,
I think we can live with for now.

It looks like when Slackware 15.1 comes, its new man-db version is
going to generate the databases much faster (a while back, someone
reported "mandb -c" only taking 10 seconds, where it took 10 minutes
on my 15.0 box).

So maybe we should be trying to talk PV into changing
/etc/cron.daily/man-db, add a "-c" to the mandb command it
runs. That'd make mandb rebuild the whole cache from scratch, and we
wouldn't have to worry about doinst.sh at all.

Pat doesn't seem to answer emails any more (or anyway, not the last
few I sent him), maybe someone who uses LQ could try to contact him
there? (I don't use it, not a big fan of web forums)


More information about the SlackBuilds-users mailing list