Hello Michael,

On 18/07/19 15:09, Michael Biebl wrote:
Hi Laurent

Am 18.07.19 um 14:40 schrieb Laurent Bigonville:
Package: debhelper
Version: 12.2.2
Severity: normal
File: /usr/bin/dh_installsystemd

Hi,

When calling "dh_installsystemd -ppolicycoreutils --no-start 
--no-restart-after-upgrade"
the call to systemctl daemon-reload is only added in the postrm script,
not the postinst one

Is that expected?
Hm, good question. Strictly speaking, a daemon-reload is not necessary,
unless you (re)start the service. Do you expect your users to (re)start
the service manually? Can you elaborate on the use case here?
If a user would do that manually, we would get a warning from systemctl
that the file has changed on disk (in case it actually has...)

For my specific case here, it's not expected that the user will manually start the service after the package installation.

But I can imagine cases (even if it's not the habit in debian to not automatically start the service after installation) where this will be desired.

What we might do is to run daemon-reload implicitly via a dpkg
file-trigger. This would cover cases like yours.
Not sure. Thoughts?

Is it a good idea to have a different way of calling daemon-reload only for this case?

In the other cases you still need to do that synchronously




See also
https://salsa.debian.org/systemd-team/systemd/blob/master/debian/systemd.triggers
https://salsa.debian.org/systemd-team/systemd/blob/master/debian/systemd.postinst#L16

Reply via email to