Author: adam-guest
Date: 2008-10-11 18:08:26 +0000 (Sat, 11 Oct 2008)
New Revision: 1659
Modified:
trunk/debian/changelog
trunk/scripts/uscan.pl
Log:
uscan: Allow --download-version to be more useful in situations where a
current upstream version higher than that to be downloaded has been
specified. Thanks James Westby. (Closes: #501932)
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-10-07 18:51:59 UTC (rev 1658)
+++ trunk/debian/changelog 2008-10-11 18:08:26 UTC (rev 1659)
@@ -16,6 +16,9 @@
* licensecheck: Add support for fortran and Scilab files and for detecting
the CeCILL and "SGI Free B" licenses. Thanks Sylvestre Ledru
(Closes: #501447)
+ * uscan: Allow --download-version to be more useful in situations where a
+ current upstream version higher than that to be downloaded has been
+ specified. Thanks James Westby. (Closes: #501932)
[ James Vega ]
* pts-subscribe: When called as pts-unsubscribe, send an unsubscribe request
Modified: trunk/scripts/uscan.pl
===================================================================
--- trunk/scripts/uscan.pl 2008-10-07 18:51:59 UTC (rev 1658)
+++ trunk/scripts/uscan.pl 2008-10-11 18:08:26 UTC (rev 1659)
@@ -1142,18 +1142,24 @@
# We use dpkg's rules to determine whether our current version
# is newer or older than the remote version.
- if (system("dpkg --compare-versions '$mangled_lastversion' gt
'$newversion'") == 0) {
- if ($verbose) {
- print " => remote site does not even have current version\n";
- } elsif ($dehs) {
- $dehs_tags{'status'} = "Debian version newer than remote site";
+ if (!defined $download_version) {
+ if (system("dpkg --compare-versions '$mangled_lastversion' gt
'$newversion'") == 0) {
+ if ($verbose) {
+ print " => remote site does not even have current version\n";
+ } elsif ($dehs) {
+ $dehs_tags{'status'} = "Debian version newer than remote site";
+ } else {
+ print "$pkg: remote site does not even have current version\n";
+ }
+ return 0;
} else {
- print "$pkg: remote site does not even have current version\n";
+ # There's a newer upstream version available, which may already
+ # be on our system or may not be
+ $found++;
}
- return 0;
} else {
- # There's a newer upstream version available, which may already
- # be on our system or may not be
+ # Flag that we found a newer upstream version, so that the exit status
+ # is set correctly
$found++;
}
--
To unsubscribe, send mail to [EMAIL PROTECTED]