Bug#907019: lintian: Please do not issue error init.d-script-should-always-start-service when reason is commented
Hello Andreas Tille,
On Thu, Aug 23, 2018 at 09:37:03AM +0200, Andreas Tille wrote:
> Package: lintian
> Severity: normal
>
> Hi,
>
> I'm working on virtuoso-opensource package and I realised that lintian
> is issuing an error even if the reason is deactivated by a comment like
> here:
>
> https://salsa.debian.org/science-team/virtuoso-opensource/commit/327a5f73645efafdd4be700ff036038f59bff1ad
>
> Please check whether there is a comment sign before RUN (and others)
> before issuing the error.
I think this is a bad idea. In my view (which is my personal view and
maybe completely unimportant to everyone) the reason for this check
is not to get people to comment out a line in their /etc/default
files, but to remove any trace of supporting this anti-pattern!
Remove the line in your default file, remove any code in your init
script dealing with it, remove any other trace of it anywhere else
it might have crept in... in other words nuke it into orbit!
While doing so, you ofcourse also need to make sure to provide
a nice migration path for your users. You should add postinst
code that runs on package upgrades (once) that will update the
enabled state of the service to match the users (old) setting
(and then clean up their /etc/default file by removing the setting
there).
In other words, I'm going to state that lintian still triggering
on the way you linked to above is very good, because your change
doesn't actually solve the issue!
If the issue wasn't clear enough, supporting RUN=no (instead of actually
updating the service state) means it's no longer possible to inspect the
state of services in a generic fashion,
eg. systemctl is-enabled foo.service
The value of having policy-mandated update-rc.d / invoke-rc.d
abstractions is decreased if people duplicate their state and make it
inconsistent.
Regards,
Andreas Henriksson
Reply to: