[devscripts] 02/02: uscan: Auto enable --force-download
Osamu Aoki
osamu at moszumanska.debian.org
Fri Sep 29 12:55:51 UTC 2017
This is an automated email from the git hooks/post-receive script.
osamu pushed a commit to branch master
in repository devscripts.
commit a2366f8562bf8ee08523a628c415f3fabfbad52e
Author: Osamu Aoki <osamu at debian.org>
Date: Fri Sep 29 21:33:25 2017 +0900
uscan: Auto enable --force-download
For cases when the version to be downloaded is not expected to be newer due to
other options set such as
* --download-version set in the command line option
* --download-debversion set in the command line option
* --download-current-version set in the command line option
* "same" used as version after URL instead of "debian" in watch line
* "previous" used as version after URL instead of "debian" in watch line
Set $download=2 if $download == 1.
Here, $download has the following meanings
0 = no-download,
1 = download (default, only-new),
2 = force-download (even if file is up-to-date version),
3 = overwrite-download (even if file exists)
Signed-off-by: Osamu Aoki <osamu at debian.org>
---
scripts/uscan.pl | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index 279c84a..e1bff3f 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 {
--
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