Bug#368066: [Buildd-tools-devel] Bug#368066: sbuild: version strings should be allowed to be "0"

Santiago Vila sanvila at unex.es
Fri May 19 18:13:15 UTC 2006


On Fri, 19 May 2006, Roger Leigh wrote:

> That's my fault, I think.
>
> > -		if (!$version) {
> > +		if ($version eq "") {
>
> $version may not always be defined, so it should probably be
>
> if (!defined $version || $version eq "")
>
> Would that be OK?

I don't speak perl, but an undefined string seems to be already caught
by the above check. I tried this simple script to see:

#!/usr/bin/perl
if ($version eq "") {
  print "parse error\n";
}

so I think ($version eq "") does the job well enough for now.

Maybe things would be different if sbuild invoked perl using -w,
but if you go that route, there would be a lot more lines to change,
not just this completely minor thing about 0 as a version string.





More information about the Buildd-tools-devel mailing list