History log of /systemd/src/core/triggers.systemd.in
Revision Date Author Comments Expand
12dde791d519bc80d5cca4ab6f088763cd481015 23-Nov-2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

Convert file trigger scripts to lua At least the %filetriggerpostun script can be invoked hundreds of times during an upgrade, so it makes sense to optimize it a bit. assert(exec(...)) is used because of https://bugzilla.redhat.com/show_bug.cgi?id=1094072. Add -P (--priority) to have %filetriggerpostun run as early as possible (before any reload/stop actions), and %transfiletriggerin as late as possible (after any enable/disable/preset actions).

b7cf9ac00afb10b5a2f63446babcf8d97111a636 23-Nov-2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

Rework file trigger scripts to fire at the right time This turns out to be more complicated than it looked initially... %transfiletriggerun is called early, while %transfiletriggerin is called late, and neither satifisfies the requirement to call daemon-reload after new unit files have been installed, but before %postun scripts in packages get to fire. It seems that the only solution is to use %filetriggerun (which is called once per package) to do the reload, and keep state in /var/lib/rpm-state/systemd/ to avoid calling the reload multiple times. https://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Saving_state_between_scriptlets says that /var/lib/rpm-state/systemd/ is the right dir.

873e413323dfff4023604849c70944674ae5cd29 16-Nov-2015 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>

Move daemon-reload from package %post scripts to file triggers This uses new functionality added in rpm 4.13. Instead of doing one daemon-reload per packages, we do just one or two (When both installing and uninstalling packages, we do two. Unfortunately this also includes the common case of upgrades. When only installing or when only installing, we do just one.) New file triggers.systemd can be built, but the contents have to be copied into the rpm spec file by hand. Using %{load} does not seem to work. It can serve as documentation.