On Wed, Sep 27, 2017 at 05:33:00PM +0000, Christoph Berg wrote:
...

>        new  8536b84   origtargz: Add --force-download to uscan 
> --download-current version; recent uscan versions require it

How about:
 If --safe, let's not change $download to 2
 If normal download, enable --force-download with $download to 2

Renaming $download to $download_mode may make scanning the source
easier.

There are 4 cases I allow $badversion.  They seem to need --force-download too.

$ git diff
diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index 279c84ad..e1bff3fe 100755
--- a/scripts/uscan.pl
+++ b/scripts/uscan.pl
@@ -2757,14 +2757,17 @@ sub process_watchline ($$$$$$)
     # Set $download_version etc. if already known
     if(defined $opt_download_version) {
        $download_version = $opt_download_version;
+       $download = 2 if $download == 1; # Change default 1 -> 2
        $badversion = 1;
        uscan_verbose "Download the --download-version specified version: 
$download_version\n";
     } elsif (defined $opt_download_debversion) {
        $download_version = $mangled_lastversion;
+       $download = 2 if $download == 1; # Change default 1 -> 2
        $badversion = 1;
        uscan_verbose "Download the --download-debversion specified version 
(dversionmangled): $download_version\n";
     } elsif(defined $opt_download_current_version) {
        $download_version = $mangled_lastversion;
+       $download = 2 if $download == 1; # Change default 1 -> 2
        $badversion = 1;
        uscan_verbose "Download the --download-current-version specified 
version: $download_version\n";
     } elsif($options{'versionmode'} eq 'same') {
@@ -2773,6 +2776,7 @@ sub process_watchline ($$$$$$)
            return 1;
        }
        $download_version = $common_newversion;
+       $download = 2 if $download == 1; # Change default 1 -> 2
        $badversion = 1;
        uscan_verbose "Download secondary tarball with the matching version: 
$download_version\n";
     } elsif($options{'versionmode'} eq 'previous') {
@@ -2781,6 +2785,7 @@ sub process_watchline ($$$$$$)
            return 1;
        }
        $download_version = $previous_newversion;
+       $download = 2 if $download == 1; # Change default 1 -> 2
        $badversion = 1;
        uscan_verbose "Download the signature file with the previous tarball's 
version: $download_version\n";
     } else {
Press any key to continue...


_______________________________________________
devscripts-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel

Reply via email to