[Slackbuilds-users] always run `mandb -c` after installing/removing manpages?

B. Watson urchlay at slackware.uk
Tue Aug 13 00:33:06 UTC 2024



On Tue, 13 Aug 2024, Arkadiusz Drabczyk wrote:

> I think I know what's going on here.
>
> mandb checks if there are new files in the directory by comparing
> mtime of the database and the directory
> https://gitlab.com/man-db/man-db/-/blob/1e5462f3fd9bfd8cf496e32e23842018b67f9b91/src/check_mandirs.c#L529.
>
> mtime is saved in .tar package metadata and installpkg extracts tar
> and effectively changes the date of /usr/man/man1 to the past if
> `mandb -c` was run after the package was built. If the mtime of man
> database happens to be newer than the new mtime of /usr/man/man1 mandb
> isn't able to detect new files.

Good analysis.

> I still think that it's reasonable to expect that it
> would work immediately after the package is installed, not after 4:40
> AM and only if your machine is up.

I agree.

Adding the mandb stuff to the template will eventually fix this (as
builds are updated to use the new template).


More information about the SlackBuilds-users mailing list