diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-01-31 12:11:36 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-02-15 20:49:14 +0100 |
commit | fa97d2fcf64e0558054bee673f734f523373b146 (patch) | |
tree | 218c0327bca2c940c3c0e7d3fc9e19054fa223a3 /units/initrd-root-device.target | |
parent | rpm: order sysctl/sysusers/tmpfiles execution before package scriptlets (diff) | |
download | systemd-fa97d2fcf64e0558054bee673f734f523373b146.tar.xz systemd-fa97d2fcf64e0558054bee673f734f523373b146.zip |
rpm: restart services in %posttrans
This fixes a long-standing issue in packaging scriptlets: daemon-reload
was moved to the end of the transaction, but restarting services was still
straightaway after package installation.
https://bugzilla.redhat.com/show_bug.cgi?id=1614751
Note that daemon-reload is called twice. This wouldn't be hardly noticable,
except that now a bunch of units (at least in Fedora) generate very verbose
warnings about deprecated features. So we get those warnings twice…
reload-or-restart --needing-restart is also called twice, but the second call
is usually a noop, because the first clears the flag for restarted units. The
second call is necessary for the case where we only uninstall packages, and the
%transfiletriggerpostun trigger fires, but not the %transfiletriggerin
scriptlet.
Also note that this assumes that units are marked only for restart if paths
under @systemunitdir@ or /etc/systemd/system have been touched. I would prefer
make the trigger that does 'restart --needing-restart' fire always, but it
seems rpm doesn't have such functionality. (Except as a %transfiletrigger that
would trigger on "/*" to catch all transactions, but that seems ineffiecient
and ugly.)
Diffstat (limited to 'units/initrd-root-device.target')
0 files changed, 0 insertions, 0 deletions