[debhelper-devel] [debhelper] 01/01: dh_systemd_enable: Fix regression in installation of template units

Niels Thykier nthykier at moszumanska.debian.org
Sun Oct 8 09:39:15 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 aaf90aff170e29fda86227583f6ce318dad7defd
Author: Niels Thykier <niels at thykier.net>
Date:   Sun Oct 8 09:34:47 2017 +0000

    dh_systemd_enable: Fix regression in installation of template units
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 debian/changelog  |  3 +++
 dh_systemd_enable | 14 ++++++--------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index a392250..5e62c31 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,6 +22,9 @@ debhelper (10.9.1) UNRELEASED; urgency=medium
     until compat 12.
   * Dh_Lib: Defer making the "shell-spawning bug" in doit an error
     until compat 12.
+  * dh_systemd_enable: Fix regression in debhelper/10.9 where
+    template units would be installed as regular units (and
+    possibly replace regular units).
 
   [ Dmitry Shachnev ]
   * qmake.pm: Add basic cross-building support.  (Closes: #877357)
diff --git a/dh_systemd_enable b/dh_systemd_enable
index a2b0cfa..d968620 100755
--- a/dh_systemd_enable
+++ b/dh_systemd_enable
@@ -178,16 +178,14 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 		$script=$package;
 	}
 
-	foreach my $suffix ('', '@') {
-		install_unit("$package$suffix", $script, 'service', "$tmpdir/lib/systemd/system");
-		install_unit("$package$suffix", $script, 'target', "$tmpdir/lib/systemd/system");
-		install_unit("$package$suffix", $script, 'socket', "$tmpdir/lib/systemd/system");
-		install_unit("$package$suffix", $script, 'mount', "$tmpdir/lib/systemd/system") if $suffix eq '';
-		install_unit("$package$suffix", $script, 'path', "$tmpdir/lib/systemd/system");
-		install_unit("$package$suffix", $script, 'tmpfile', "$tmpdir/usr/lib/tmpfiles.d", 'conf') if $suffix eq '';
-		install_unit("$package$suffix", $script, 'timer', "$tmpdir/lib/systemd/system");
+	for my $service_type (qw(service target socket path timer)) {
+		install_unit($package, $script, $service_type, "$tmpdir/lib/systemd/system");
+		install_unit("${package}@", "${script}@", $service_type, "$tmpdir/lib/systemd/system");
 	}
 
+	install_unit($package, $script, 'mount', "$tmpdir/lib/systemd/system");
+	install_unit($package, $script, 'tmpfile', "$tmpdir/usr/lib/tmpfiles.d", 'conf');
+
 	find({
 		wanted => sub {
 			my $name = $File::Find::name;

-- 
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