Comment 13 for bug 1962036

Revision history for this message
Dave Jones (waveform) wrote :

Some additional info:

"dh_installsystemd --no-start" on its own is *not* equivalent to "--no-start --restart-after-upgrade" as one might imagine ("--restart-after-upgrade" is *usually* the dh_installsystemd default). Instead "--no-start" adjusts the restart default to "--no-restart-after-upgrade" (I'm now *fairly* convinced this is actually a bug). Unfortunately "--no-restart-after-upgrade" cannot work with "--no-start" because, whilst the preinst script will always stop the service, the postinst script won't attempt to start it again because "--no-start" is specified.

Even if dh_installsystemd did try to be more intelligent, I'm not convinced this combination can ever work in all circumstances: the postinst maintscript cannot know whether the service was running prior to the preinst script stopping it because the idempotency requirement for maintscripts implies that postinst is not necessarily running immediately after preinst.

In other words, "--no-start --no-restart-after-upgrade" (or "--no-start" on its own which is equivalent) is a broken combination which does not (and probably cannot, at least with the current design) work.