[debhelper-devel] [debhelper] 03/21: dh_installsystemd: Regex-escape two directories used in regexes

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 0131460b04e2b0211004a76410b24bc9fc9fd178
Author: Niels Thykier <niels at thykier.net>
Date:   Wed Oct 4 18:27:35 2017 +0000

    dh_installsystemd: Regex-escape two directories used in regexes
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 dh_installsystemd | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dh_installsystemd b/dh_installsystemd
index c6ff8c6..793ebd8 100755
--- a/dh_installsystemd
+++ b/dh_installsystemd
@@ -245,10 +245,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
 		wanted => sub {
 			my $name = $File::Find::name;
 			return unless -f $name;
-			return unless $name =~ m,^$tmpdir/lib/systemd/system/[^/]+$,;
+			return unless $name =~ m,^\Q${tmpdir}\E/lib/systemd/system/[^/]+$,;
 			if (-l) {
 				my $target = abs_path(readlink());
-				$target =~ s,^$oldcwd/,,g;
+				$target =~ s,^\Q${oldcwd}\E/,,g;
 				$aliases{$target} = [ $_ ];
 			} else {
 				push @installed_units, $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