[lintian] 04/05: c/systemd: Don't emit systemd-service-file-missing-install-key for Type=oneshot.
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository lintian.
commit fdde26a658a3f3e9dfa89914c0519c6752b408a6
Author: Chris Lamb <lamby@debian.org>
Date: Thu Sep 8 12:48:09 2016 +0100
c/systemd: Don't emit systemd-service-file-missing-install-key for Type=oneshot.
[nthykier: Use "any" instead of "grep" for the boolean condition]
Signed-off-by: Niels Thykier <niels@thykier.net>
---
checks/systemd.pm | 1 +
t/tests/systemd-complex-service-file/debian/debian/install | 1 +
t/tests/systemd-complex-service-file/debian/debian/test5.service | 6 ++++++
3 files changed, 8 insertions(+)
diff --git a/checks/systemd.pm b/checks/systemd.pm
index b670c37..4daea98 100644
--- a/checks/systemd.pm
+++ b/checks/systemd.pm
@@ -205,6 +205,7 @@ sub check_systemd_service_file {
unless extract_service_file_values($file, 'Install', 'WantedBy',1)
or extract_service_file_values($file, 'Install', 'RequiredBy',1)
or extract_service_file_values($file, 'Install', 'Also',1)
+ or any { /^oneshot$/ } extract_service_file_values($file, 'Service', 'Type')
or $file =~ m,@\.service$,;
}
diff --git a/t/tests/systemd-complex-service-file/debian/debian/install b/t/tests/systemd-complex-service-file/debian/debian/install
index a4ea934..763129d 100644
--- a/t/tests/systemd-complex-service-file/debian/debian/install
+++ b/t/tests/systemd-complex-service-file/debian/debian/install
@@ -2,4 +2,5 @@ debian/test.service lib/systemd/system/
debian/test2.service lib/systemd/system/
debian/test3.service lib/systemd/system/
debian/test4.service lib/systemd/system/
+debian/test5.service lib/systemd/system/
debian/test@.service lib/systemd/system/
diff --git a/t/tests/systemd-complex-service-file/debian/debian/test5.service b/t/tests/systemd-complex-service-file/debian/debian/test5.service
new file mode 100644
index 0000000..64a7562
--- /dev/null
+++ b/t/tests/systemd-complex-service-file/debian/debian/test5.service
@@ -0,0 +1,6 @@
+[Unit]
+Documentation=https://www.example.com/
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/test
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: