[Reproducible-commits] [dpkg] 05/40: scripts: Use non-destructive substitutions inside map
Jérémy Bobbio
lunar at moszumanska.debian.org
Sat May 30 09:52:47 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch pu/reproducible_builds
in repository dpkg.
commit e4baa20f727c041f7dba60c18fc434053f13fa98
Author: Guillem Jover <guillem at debian.org>
Date: Wed May 20 14:47:11 2015 +0200
scripts: Use non-destructive substitutions inside map
This avoids having to use a temporary variable, and makes the code more
clear.
---
debian/changelog | 1 +
scripts/Dpkg/Source/Package/V1.pm | 2 +-
scripts/Dpkg/Source/Package/V2.pm | 6 +-----
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index ed2ba25..b0cee5a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ dpkg (1.18.1) UNRELEASED; urgency=low
Closes: #720761
* Perl modules:
- Add missing strict and warnings pragmas for submodules.
+ - Use non-destructive substitutions inside map.
[ Updated programs translations ]
* German (Sven Joachim).
diff --git a/scripts/Dpkg/Source/Package/V1.pm b/scripts/Dpkg/Source/Package/V1.pm
index 08b02d1..db81962 100644
--- a/scripts/Dpkg/Source/Package/V1.pm
+++ b/scripts/Dpkg/Source/Package/V1.pm
@@ -378,7 +378,7 @@ sub do_build {
my $analysis = $diff->analyze($origdir);
my @files = grep { ! m{^debian/} }
- map { my $file = $_; $file =~ s{^[^/]+/+}{}; $file }
+ map { s{^[^/]+/+}{}r }
sort keys %{$analysis->{filepatched}};
if (scalar @files) {
warning(g_('the diff modifies the following upstream files: %s'),
diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm
index 6982563..e27758e 100644
--- a/scripts/Dpkg/Source/Package/V2.pm
+++ b/scripts/Dpkg/Source/Package/V2.pm
@@ -466,11 +466,7 @@ sub do_build {
}
};
my $tar_ignore_glob = '{' . join(',',
- map {
- my $copy = $_;
- $copy =~ s/,/\\,/g;
- $copy;
- } @{$self->{options}{tar_ignore}}) . '}';
+ map { s/,/\\,/rg } @{$self->{options}{tar_ignore}}) . '}';
my $filter_ignore = sub {
# Filter out files that are not going to be included in the debian
# tarball due to ignores.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list