While debugging test failures in t/recipes/checks/init-d/init.d-general,
I noticed the following unexpected change in emitted tags at commit
9e7db94ee5eadab0e6e7b4509abdea7c2087af31 (i.e. the 211th commit after
2.114.0):
I moved the #DEBHELPER# token in
t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-bugs.postinst
behind the additional update-rc.d call to hopefully get less often
changing line numbers after new debhelper releases (which was actually
the cause for the test failure):
diff --git a/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-bugs.postinst b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-bugs.postinst
index e3bb515a1..d14ad23f9 100644
--- a/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-bugs.postinst
+++ b/t/recipes/checks/init-d/init.d-general/build-spec/debian/init.d-general-bugs.postinst
@@ -2,9 +2,9 @@
set -e
-#DEBHELPER#
-
if [ "$1" = "configure" ] ; then
# duplicate call as debhelper will add one for us
update-rc.d init.d-general-bugs word
fi
+
+#DEBHELPER#
And suddenly, lintian correctly emitted
init.d-general-bugs (binary): output-of-updaterc.d-not-redirected-to-dev-null init.d-general-bugs [postinst:7]
which it didn't do beforehand but should have.
How to reproduce:
Checkout commit 9e7db94ee5eadab0e6e7b4509abdea7c2087af31, apply the
patch above and run
private/runtests -o check:init-d
Lintian will show you the diff as follows:
Failed test: t/recipes/checks/init-d/init.d-general
-init.d-general-bugs (binary): duplicate-updaterc.d-calls-in-postinst init.d-general-bugs [postinst:17]
+init.d-general-bugs (binary): output-of-updaterc.d-not-redirected-to-dev-null init.d-general-bugs [postinst:7]
+init.d-general-bugs (binary): duplicate-updaterc.d-calls-in-postinst init.d-general-bugs [postinst:13]
>>> Fix test (y), accept all (a), do not fix (n), quit (q/default)?
Note that not just the line number changed as expected, but an
additional tag showed up.