Skip to content

man-db: Configure a systemd .service to be triggered from the man-db trigger #1451

@ermo

Description

@ermo

The man-db trigger is currently considered a tx trigger, which is quite literally nuts, because all mandb does is that it indexes man-pages under /usr/share/man and then creates whatis and apropos gdbm format files under /var/cache/man/.

From man mandb:

mandb is used to initialise or manually update index database caches.
The caches contain information relevant  to  the  current  state of the manual page system
and the information stored within them is used by the man‐db utilities to enhance
their speed and functionality.

Given that these caches are not critical for watching man pages via man n foo, it is thus reasonable to shove their creation off to a systemd-controlled service that refreshes the releated indices in the background.

One way of efficiently doing this is to have the man-db trigger simply touch a file that is watched by a listening, systemd-controlled man-db.service (or .socket unit).

Example:
https://serverfault.com/questions/1175044/is-there-a-way-to-activate-a-service-unit-whenever-a-file-gets-updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: plumbingOS / system architecture related

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions