[pkg-perl-tools] 01/03: scripts/debian-upstream: only replace URLs for existing keys.
gregor herrmann
gregoa at debian.org
Fri May 27 13:03:32 UTC 2016
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to branch master
in repository pkg-perl-tools.
commit 9cb194697439ea309980f671afc8847f3d8b4a1d
Author: gregor herrmann <gregoa at debian.org>
Date: Fri May 27 15:00:19 2016 +0200
scripts/debian-upstream: only replace URLs for existing keys.
Avoids a warning about uninitialized values.
---
scripts/debian-upstream | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/scripts/debian-upstream b/scripts/debian-upstream
index e051b51..131bd69 100755
--- a/scripts/debian-upstream
+++ b/scripts/debian-upstream
@@ -42,11 +42,13 @@ my %secure_URL = (
# Switch to secure URLs
for my $replacement (keys %secure_URL) {
my $regex = build_regex(@{ $secure_URL{$replacement} });
- $upstream->{$_} =~ s|$regex|$replacement| for (qw(
+ foreach (qw(
Bug-Database
Repository
Repository-Browse
- ));
+ )) {
+ $upstream->{$_} =~ s|$regex|$replacement| if $upstream->{$_};
+ }
}
foreach ( keys %{$upstream} ) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/pkg-perl-tools.git
More information about the Pkg-perl-cvs-commits
mailing list