[devscripts] 01/01: uscan: Avoid using undefined $keyring variable

James McCoy jamessan at debian.org
Sun Sep 28 22:46:09 UTC 2014


This is an automated email from the git hooks/post-receive script.

jamessan pushed a commit to branch master
in repository devscripts.

commit 557531fb686a13f27fd53a9184a859ea2e8207da
Author: James McCoy <jamessan at debian.org>
Date:   Sun Sep 28 18:46:57 2014 -0400

    uscan: Avoid using undefined $keyring variable
    
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 debian/changelog | 7 +++++++
 scripts/uscan.pl | 8 ++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index fd60b6f..fb44237 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+devscripts (2.14.8) UNRELEASED; urgency=medium
+
+  * uscan: Ensure $keyring is defined before trying to use it when checking
+    whether the upstream keyring exists.
+
+ -- James McCoy <jamessan at debian.org>  Sun, 28 Sep 2014 18:44:12 -0400
+
 devscripts (2.14.7) unstable; urgency=low
 
   [ Cyril Brulebois ]
diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index c788ead..d9e1304 100755
--- a/scripts/uscan.pl
+++ b/scripts/uscan.pl
@@ -851,6 +851,10 @@ sub process_watchline ($$$$$$)
 		return 1;
 	    }
 	    $keyring = first { -r $_ } qw(debian/upstream/signing-key.pgp debian/upstream/signing-key.asc debian/upstream-signing-key.pgp);
+	    if (!defined $keyring) {
+		uscan_warn "$progname warning: pgpsigurlmangle option exists, but the upstream keyring does not exist\n  in $watchfile, skipping:\n  $line\n";
+		return 1;
+	    }
 	    if ($keyring =~ m/\.asc$/) {
 		if (!$havegpg) {
 		    uscan_warn "$progname warning: $keyring is armored but gpg/gpg2 is not available to dearmor it\n  in $watchfile, skipping:\n $line\n";
@@ -862,10 +866,6 @@ sub process_watchline ($$$$$$)
 		      wait_child => 1);
 		$keyring = "$gpghome/pubring.gpg";
 	    }
-	    if (!defined $keyring) {
-		uscan_warn "$progname warning: pgpsigurlmangle option exists, but the upstream keyring does not exist\n  in $watchfile, skipping:\n  $line\n";
-		return 1;
-	    }
 	}
 
 	# Handle sf.net addresses specially

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list