[devscripts] 01/01: uscan: improve messaging for download

Osamu Aoki osamu at moszumanska.debian.org
Mon Feb 8 13:05:57 UTC 2016


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

osamu pushed a commit to branch master
in repository devscripts.

commit 5b9771cc00fdce07b39be124b9b0014a5f6535d7
Author: Osamu Aoki <osamu at debian.org>
Date:   Mon Feb 8 22:02:32 2016 +0900

    uscan: improve messaging for download
    
    Fix overwrite download bug, too
---
 scripts/uscan.pl | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index a39126f..d78ec94 100755
--- a/scripts/uscan.pl
+++ b/scripts/uscan.pl
@@ -3441,15 +3441,26 @@ EOF
 	# try download package
 	if ( $download == 3 and -e "$destdir/$newfile_base") {
 	    uscan_verbose "Downloading and overwriting existing file: $newfile_base\n";
+	    $download_available = $downloader->($upstream_url, "$destdir/$newfile_base", $options{'mode'});
+	    if ($download_available) {
+		dehs_verbose "Successfully downloaded package: $newfile_base\n";
+	    } else {
+		dehs_verbose "Failed to download upstream package: $newfile_base\n";
+	    }
 	} elsif ( -e "$destdir/$newfile_base") {
-	    uscan_verbose "Not downloading, using existing file: $newfile_base\n";
 	    $download_available = 1;
+	    dehs_verbose "Not downloading, using existing file: $newfile_base\n";
 	} elsif ($download >0) {
 	    uscan_verbose "Downloading upstream package: $newfile_base\n";
 	    $download_available = $downloader->($upstream_url, "$destdir/$newfile_base", $options{'mode'});
+	    if ($download_available) {
+		dehs_verbose "Successfully downloaded package: $newfile_base\n";
+	    } else {
+		dehs_verbose "Failed to download upstream package: $newfile_base\n";
+	    }
 	} else { # $download = 0,
-	    uscan_verbose "Not downloading upstream package: $newfile_base\n";
 	    $download_available = 0;
+	    dehs_verbose "Not downloading upstream package: $newfile_base\n";
 	}
 
 	# Decompress archive if requested and applicable
@@ -3647,7 +3658,6 @@ EOF
 	# MUT disables repacksuffix so it is safe to have this before mk-origtargz
 	$common_mangled_newversion = $mangled_newversion;
     }
-    dehs_verbose "Successfully downloaded package $newfile_base\n" if $options{'pgpmode'} ne 'previous';
 
     if ($options{'pgpmode'} eq 'next') {
 	uscan_verbose "Read the next watch line (pgpmode=next)\n";

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