On 26 April 2016 at 02:13, Raphaël Hertzog <[email protected]> wrote: > If a package contains a debian/foo.service file that gets installed by > dh_installinit (but no debian/foo.init) then the generated maintainer > scripts will still contain the update-rc.d invocations that are strictly > useless since /etc/init.d/foo does not exist.
I was looking into this to see if I could come up with a simple patch to fix it, but the fix I was going to write is already in place: | if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then | if [ -x "/etc/init.d/#SCRIPT#" ]; then | update-rc.d #SCRIPT# #INITPARMS# >/dev/null | invoke-rc.d #SCRIPT# start || #ERROR_HANDLER# | fi | fi (the "[ -x "/etc/init.d/#SCRIPT#" ]" bit, https://anonscm.debian.org/cgit/debhelper/debhelper.git/tree/autoscripts/postinst-init) Is this check not working properly? (Seems it was first introduced in https://anonscm.debian.org/cgit/debhelper/debhelper.git/commit/autoscripts/postinst-init?id=515a01d46a768ee63a4665c643cdd6889ffaebfc and updated to use "-x" instead of "-e" in https://anonscm.debian.org/cgit/debhelper/debhelper.git/commit/autoscripts/postinst-init?id=1f33258d1a687b64d7252fc144c2dd5530740272, both in 2001) > Furthermore the presence of those snippets lead to lintian > warnings/errors: > W: hostapd-wpe: init.d-script-not-marked-as-conffile etc/init.d/hostapd-wpe > E: hostapd-wpe: init.d-script-not-included-in-package etc/init.d/hostapd-wpe The lintian warnings are strange, and I think should be considered a false-positive in the lintian code itself (since the lines they're detecting in postinit are wrapped by an appropriate conditional). :( I looked a little bit at the dh_installinit code to see how easy it would be to remove these lines completely when they're not necessary, but it's definitely not trivial (which I think is why the "if" statement was added in the first place). ♥, - Tianon 4096R / B42F 6819 007F 00F8 8E36 4FD4 036A 9C25 BF35 7DD4

