[Reproducible-commits] [debhelper] 04/56: dh_installinit: Quote directory name used in regex
Mattia Rizzolo
mattia at mapreri.org
Sun Oct 4 17:06:13 UTC 2015
This is an automated email from the git hooks/post-receive script.
mapreri-guest pushed a commit to branch master
in repository debhelper.
commit f585d0e4c4fbe281062eda7555c198cb8e620263
Author: Niels Thykier <niels at thykier.net>
Date: Sat Aug 15 14:40:44 2015 +0200
dh_installinit: Quote directory name used in regex
And, remove a redundant variable.
Signed-off-by: Niels Thykier <niels at thykier.net>
---
debian/changelog | 2 ++
dh_installinit | 5 ++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 8ba0520..47cdb06 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,8 @@ debhelper (9.20150811+unreleased) UNRELEASED; urgency=medium
Felix Geyer, Lisandro Damián Nicanor Pérez Meyer and
Michael Terry for the assistance plus suggestions.
(Closes: #719148)
+ * dh_installinit: Quote directory name before using it in
+ a regex.
[ Paul Tagliamonte ]
* dh_gencontrol: Put debug debs back in the "debug" section.
diff --git a/dh_installinit b/dh_installinit
index 579fc69..8f08965 100755
--- a/dh_installinit
+++ b/dh_installinit
@@ -266,20 +266,19 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
if (! $dh{NOSCRIPTS}) {
# Include postinst-init-tmpfiles if the package ships any files
# in /usr/lib/tmpfiles.d or /etc/tmpfiles.d
- my $tmpdir = tmpdir($package);
my @tmpfiles;
find({
wanted => sub {
my $name = $File::Find::name;
return unless -f $name;
- $name =~ s/^$tmpdir//g;
+ $name =~ s/^\Q$tmp\E//g;
if ($name =~ m,^/usr/lib/tmpfiles\.d/, ||
$name =~ m,^/etc/tmpfiles\.d/,) {
push @tmpfiles, $name;
}
},
no_chdir => 1,
- }, $tmpdir);
+ }, $tmp);
if (@tmpfiles > 0) {
autoscript($package,"postinst", "postinst-init-tmpfiles",
"s,#TMPFILES#," . join(" ", @tmpfiles).",");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/debhelper.git
More information about the Reproducible-commits
mailing list