[Mageia-dev] systemd service file update message

Anssi Hannula anssi at mageia.org
Mon Mar 19 13:36:33 CET 2012


19.03.2012 14:32, Guillaume Rousse kirjoitti:
> This happens whenever a package with systemd support is updated:
> 
> installation de nginx-1.0.14-1.mga2.x86_64.rpm depuis /var/cache/urpmi/rpms
> Préparation ... #############################################
>       1/1: nginx #############################################
> Warning: Unit file of created job changed on disk, 'systemctl --system
> daemon-reload' recommended.
> 
> First question: should we not make rpm-helper automatically do it, if
> not already done ?
> 
> Second question: could we ensure the message is not displayed if handled
> automatically ?

Looks it is handled (somewhat):
> [anssi at sigma ~]$ cat /var/lib/rpm/filetriggers/systemd-daemon-reload.filter 
> ^./lib/systemd/system/
> ^./etc/systemd/system/
> [anssi at sigma ~]$ cat /var/lib/rpm/filetriggers/systemd-daemon-reload.script 
> #!/bin/sh
> if /bin/mountpoint -q /sys/fs/cgroup/systemd; then
>   if [ -x /bin/systemctl ]; then
>   /bin/systemctl daemon-reload >/dev/null 2>&1 || :
>   fi
> fi

However, maybe it is done too late? The Warning comes from %post, while
filetriggers are run at %posttrans time.
Maybe daemon-reload should be run in %_post_service instead?

-- 
Anssi Hannula


More information about the Mageia-dev mailing list