[devscripts] 01/02: uscan: Ensure $lastversion is defined instead of "true"

James McCoy jamessan at debian.org
Thu Aug 27 01:59:22 UTC 2015


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

jamessan pushed a commit to branch master
in repository devscripts.

commit 7e6a69c8f65a27fa18e4a77d4d0ab671998c2096
Author: Osamu Aoki <osamu at debian.org>
Date:   Tue Aug 25 23:04:03 2015 +0000

    uscan: Ensure $lastversion is defined instead of "true"
    
    Enable to define $lastversion as 0
    
    Signed-off-by: James McCoy <jamessan at debian.org>
---
 debian/changelog | 6 ++++++
 scripts/uscan.pl | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 5e05cb2..3204117 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,6 +38,12 @@ devscripts (2.15.9) UNRELEASED; urgency=medium
   * uscan: Use https protocol for pypi.debian.net redirector, now that it
     is available.  (Closes: #796880)
 
+  [ Osamu Aoki ]
+  * uscan:
+    + Ensure the version field in the watch line is defined, rather than
+      "true" before using it in a comparison.  The enables the use of 0 as a
+      value for the version.  (Closes: #796984)
+
  -- Joachim Breitner <nomeata at debian.org>  Tue, 11 Aug 2015 21:12:03 +0200
 
 devscripts (2.15.8) unstable; urgency=high
diff --git a/scripts/uscan.pl b/scripts/uscan.pl
index 02c6494..33f3ad4 100755
--- a/scripts/uscan.pl
+++ b/scripts/uscan.pl
@@ -847,7 +847,7 @@ sub process_watchline ($$$$$$)
 	    (undef, $lastversion, $action) = split ' ', $line, 3;
 	}
 
-	if ((!$lastversion or $lastversion eq 'debian') and not defined $pkg_version) {
+	if ((! defined $lastversion or $lastversion eq 'debian') and not defined $pkg_version) {
 	    uscan_warn "$progname warning: Unable to determine current version\n  in $watchfile, skipping:\n  $line\n";
 	    return 1;
 	}
@@ -915,7 +915,7 @@ sub process_watchline ($$$$$$)
 	$pattern = "(?:(?:$site)?" . quotemeta($basedir) . ")?$filepattern";
     }
 
-    if (! $lastversion or $lastversion eq 'debian') {
+    if (! defined $lastversion or $lastversion eq 'debian') {
 	if (defined $pkg_version) {
 	    $lastversion=$pkg_version;
 	} 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