[debhelper-devel] [debhelper] 03/05: dh_installsystemd: Enable dh_installsystemd in old compat levels

Niels Thykier nthykier at moszumanska.debian.org
Sat Dec 16 15:54:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository debhelper.

commit c6cf339ecaf2fd1328b40c2432bba4f939d68045
Author: Niels Thykier <niels at thykier.net>
Date:   Sat Dec 16 15:39:41 2017 +0000

    dh_installsystemd: Enable dh_installsystemd in old compat levels
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 debian/changelog                        |  2 ++
 dh_installsystemd                       |  2 --
 t/dh_installsystemd/dh_installsystemd.t | 19 +++----------------
 3 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 9f2097a..005b7e6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ debhelper (10.10.10) UNRELEASED; urgency=medium
     filled when using --dbg-package.  Thanks to Paul Wise for finding
     and reporting the bug.  (Closes: #884152)
   * d/control: Bump Standards-Version to 4.1.2 - no changes required.
+  * dh_installsystemd: Remove neutering of dh_installsystemd in compat
+    levels prior to 11 now that compat 11 is stable.
 
   [ Chris Leick ]
   * debhelper.pod: Improve the wording of two parapraphs.
diff --git a/dh_installsystemd b/dh_installsystemd
index 8dd4edc..75a3abd 100755
--- a/dh_installsystemd
+++ b/dh_installsystemd
@@ -139,8 +139,6 @@ scripts.
 
 =cut
 
-exit 0 if compat(10);
-
 $dh{RESTART_AFTER_UPGRADE} = 1;
 
 init(options => {
diff --git a/t/dh_installsystemd/dh_installsystemd.t b/t/dh_installsystemd/dh_installsystemd.t
index 70133b9..f7e806f 100755
--- a/t/dh_installsystemd/dh_installsystemd.t
+++ b/t/dh_installsystemd/dh_installsystemd.t
@@ -16,7 +16,7 @@ our @TEST_DH_EXTRA_TEMPLATE_FILES = (qw(
 ));
 
 if (uid_0_test_is_ok()) {
-	plan(tests => 2);
+	plan(tests => 1);
 } else {
 	plan skip_all => 'fakeroot required';
 }
@@ -47,7 +47,7 @@ sub unit_is_started {
 }
 
 # Units are installed and enabled
-each_compat_from_and_above_subtest(11, sub {
+each_compat_subtest {
 	ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installsystemd'));
 	ok(-e "debian/foo/lib/systemd/system/foo.service");
 	ok(-e "debian/foo.postinst.debhelper");
@@ -131,19 +131,6 @@ each_compat_from_and_above_subtest(11, sub {
 	unit_is_enabled('foo', 'foo2', 1);
 	unit_is_started('foo', 'foo2', 1);
 	ok(run_dh_tool('dh_clean'));
-});
+};
 
-each_compat_up_to_and_incl_subtest(10, sub {
-
-	ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installsystemd'));
-	ok(! -e "debian/foo/lib/systemd/system/foo.service");
-	ok(! -e "debian/foo.postinst.debhelper");
-	ok(run_dh_tool('dh_clean'));
-
-	make_path(qw(debian/foo/lib/systemd/system/));
-	install_file('debian/foo.service', 'debian/foo/lib/systemd/system/foo.service');
-	ok(run_dh_tool({ 'needs_root' => 1 }, 'dh_installsystemd'));
-	ok(! -e "debian/foo.postinst.debhelper");
-	ok(run_dh_tool('dh_clean'));
-});
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list