version_check.pl bug?

Bojan Smojver <[email protected]>
Newsgroups gmane.comp.apache.apreq
Message-ID <[email protected]>
Just got a report from Fedora build system that libapreq2-2.09-rc1
failed to build. The error was:

---------------------------
build/version_check.pl failed: automake version 1.10 unsupported (1.6.1
or greater is required).
---------------------------

Now, 1.10 _is_ greater than 1.6.1, however, the script does:

---------------------------
if ($saw =~ /^(\d+)(\.(\d+))$/) {
    $fail = $saw < $version;
---------------------------

So, numeric comparison is done, even if $version isn't really numeric
(i.e. "1.6.1"). I think we should have:

---------------------------
if ($saw =~ /^(\d+)(\.(\d+))$/ and $version =~ /^(\d+)(\.(\d+))$/) {
---------------------------

Otherwise, the comparison is bound to fail.

-- 
Bojan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.