[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 04/04: 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.

lamby pushed a commit to branch service-files-missing-install-key-false-positives
in repository lintian.

commit b380c64f21805dca56cfa84c48b83cca5381b3ef
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.
---
 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..d22140c 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 grep { /^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: