[devscripts] 02/02: uscan: Better code for !--signature handling

Osamu Aoki osamu at moszumanska.debian.org
Sat Dec 5 15:20:22 UTC 2015


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

osamu pushed a commit to branch master
in repository devscripts.

commit a7a4521df6e94d98ac78d01ed5de96877c069d81
Author: Osamu Aoki <osamu at debian.org>
Date:   Sat Dec 5 23:54:30 2015 +0900

    uscan: Better code for !--signature handling
    
    This is better solution to skip scanning possible signature files.
---
 scripts/uscan.pl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index 3c95174..6d7a0e4 100755
--- a/scripts/uscan.pl
+++ b/scripts/uscan.pl
@@ -2515,7 +2515,7 @@ sub process_watchline ($$$$$$)
 		    @{$options{'filenamemangle'}} = split /;/, $1;
 		} elsif ($opt =~ /^\s*pgpsigurlmangle\s*=\s*(.+?)\s*$/) {
 		    @{$options{'pgpsigurlmangle'}} = split /;/, $1;
-	    	    $options{'pgpmode'} = 'mangle';
+		    $options{'pgpmode'} = 'mangle';
 		} elsif ($opt =~ /^\s*oversionmangle\s*=\s*(.+?)\s*$/) {
 		    @{$options{'oversionmangle'}} = split /;/, $1;
 		} else {
@@ -2598,7 +2598,7 @@ sub process_watchline ($$$$$$)
 	# Allow 2 char shorthands for opts="pgpmode=..." and check
 	if ($options{'pgpmode'} =~ m/^au/) {
 	    $options{'pgpmode'} = 'auto';
-	    if (defined $options{'pgpsigurlmangle'}) {
+	    if (exists $options{'pgpsigurlmangle'}) {
 		uscan_warn "Ignore pgpsigurlmangle because pgpmode=auto\n";
 		delete $options{'pgpsigurlmangle'};
 	    }
@@ -3469,7 +3469,7 @@ EOF
     my $pgpsig_url;
     my $sigfile;
     my $signature_available;
-    if ($options{'pgpmode'} eq 'default' or $options{'pgpmode'} eq 'auto') {
+    if (($options{'pgpmode'} eq 'default' or $options{'pgpmode'} eq 'auto') and $signature == 1) {
 	uscan_msg "Start checking for common possible upstream OpenPGP signature files\n";
 	foreach my $suffix (qw(asc gpg pgp sig)) {
 	    my $sigrequest = HTTP::Request->new('HEAD' => "$upstream_url.$suffix");

-- 
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