Future EAPI/Triggers

Triggers generally refer to various actions related to one package that are triggered by some event caused by another package. Examples of triggers in other distributions are DpkgTriggers in Debian and alpm-hooks in Arch Linux. While those distributions support different kinds of triggers, the type most relevant to Gentoo are file triggers.

A file trigger gets activated when a package installs a file matching specific criteria. For example, if a package installs icons, a trigger can update the GTK+ icon cache.

Current state in Gentoo
A trigger-like functionality is currently provided by a few eclasses in Gentoo. There are two ways of implementing this. Either:
 * the developer can explicitly call the relevant cache update functions in ``pkg_postinst`` and ``pkg_postrm`` when he knows that the package installs the specific files,
 * the eclass can scan the installation image in ``pkg_preinst``, and afterwards call the cache update in ``pkg_postinst`` and ``pkg_postrm``.

The second method is similar to triggers, except they are manually implemented by eclass code.

Current trigger candidates
The following table lists candidates for explicit triggers. Whenever possible, please provide as much detail as possible as to the conditions triggering them.