Reported in
TWiki:Support.SID-02480
: When RCS 5.10 is installed, the configure script reports an erroneous error message:
/usr/bin/rcs is too old, upgrade to version 5.7 or higher.
Cause: The
major.minor
number compare
5.7 < 5.10
is incorrect.
Fix:
--- lib/TWiki/Configure/Checker.pm (revision 31043)
+++ lib/TWiki/Configure/Checker.pm (working copy)
@@ -298,14 +298,17 @@
if( !$prog ) {
$err .= $key.' is not set';
} else {
- my $version = `$prog --version` || '';
- if ( $version !~ /Can't exec/ && $version =~ /\s(\d+\.\d+)((:?\.\d+)*)/ ) {
+ my $stdOut = `$prog --version` || '';
+ my $version = 0;
+ if ( $stdOut !~ /Can't exec/ && $stdOut =~ /\s(\d+\.\d+)((:?\.\d+)*)/ ) {
$version = $1;
+ $version =~ s/\.(\d)$/.0$1/; # zero-pad minor version if only single digit
} else {
- $version = '';
$err .= $this->ERROR($prog.' did not return a version number (or might not exist..)');
}
- if( $version =~ /^\d/ && $version < $rcsverRequired ) {
+ my $required = $rcsverRequired;
+ $required =~ s/\.(\d)$/.0$1/; # zero-pad minor version if only single digit
+ if( $version > 0 && $version < $required ) {
# RCS too old
$err .= $prog.' is too old, upgrade to version '.
$rcsverRequired.' or higher.';
--
TWiki:Main/PeterThoeny
- 2021-12-05