[debhelper-devel] [debhelper] 09/21: dh_installsystemd: Fix bug in handling of template units (see aaf90aff)

Niels Thykier nthykier at moszumanska.debian.org
Fri Oct 13 18:27:20 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 a6746c107822c3c0f6d5d5fe8ee1c98a445062ae
Author: Niels Thykier <niels at thykier.net>
Date:   Sun Oct 8 14:46:13 2017 +0000

    dh_installsystemd: Fix bug in handling of template units (see aaf90aff)
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 dh_installsystemd | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/dh_installsystemd b/dh_installsystemd
index ccb55a5..da54689 100755
--- a/dh_installsystemd
+++ b/dh_installsystemd
@@ -230,16 +230,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');
+
 	my $oldcwd = getcwd();
 	find({
 		wanted => sub {

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