]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Fix for bug 121735: Perl warning running checksetup.pl if a module has a
authorzach%zachlipton.com <>
Mon, 28 Jan 2002 02:59:38 +0000 (02:59 +0000)
committerzach%zachlipton.com <>
Mon, 28 Jan 2002 02:59:38 +0000 (02:59 +0000)
non-numeric version number. Patch sets checksetup.pl to use a string
compare instead of a numeric one.

Patch by Dave Miller. r1=Bradley Baetz and r2=Gerv

checksetup.pl

index e5864921bccbd705b62d358da1efe527bf35076f..d793879ff775b3eeb7594f9902b06631c14273d2 100755 (executable)
@@ -167,10 +167,10 @@ sub have_vers {
   $vnum = ${"${pkg}::VERSION"} || ${"${pkg}::Version"} || 0;
   $vnum = -1 if $@;
 
-  if ($vnum < 0) {
+  if ($vnum eq "-1") { # string compare just in case it's non-numeric
     $vstr = "not found";
   }
-  elsif ($vnum > 0) {
+  elsif (vers_cmp($vnum,"0") > -1) {
     $vstr = "found v$vnum";
   }
   else {