On 14/10/17 13:27, Michael Biebl wrote:
On Fri, 4 Aug 2017 22:12:08 +0100 Alan Jenkins
<alan.christopher.jenk...@gmail.com> wrote:
Can you please explain how #714903 can be fixed differently so masking
is not needed?

> There were two reasons `mask` was used here.
>
> 1. Removing a package naturally deletes most of its files, including deleting the systemd service unit. However the system V init script is preserved, because it might include user changes. This can work OK under system V init, but systemd also picks up the initscript, and will show it as a started service in messages, logs, `systemctl list-units` etc.

I believe the solution (which may or not be politically practical) is:

Implement an equivalent feature to masking for system V init scripts, which is dedicated to handle removed packages only.

This only strictly needs to be respected by the systemd generator, which converts init scripts to systemd services.

Probably the init scripts want to include the same feature themselves.  (Around the same point where they decide whether to dispatch to `systemctl start` instead).  I think that would also allow removing some less regular weirdness from init scripts. Debian would no longer have a special requirement that init scripts silently succeed if the daemon binary does not exist.  And I think the dnsmasq package (as opposed to dnsmasq-core?) has even more special handling, which could go away.

I suspect this would end up with Debian carrying the patch to the systemd generator.  But all it needs to do is test for `/var/lib/update-rc.d/${script}.removed` and then skip ${script}.

Alan

Reply via email to