• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item7934: Configure: RCS 5.10.0 reports version is too old

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine Configure Normal Waiting for Release   patch 6.1.1

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

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

ItemTemplate
Summary Configure: RCS 5.10.0 reports version is too old
ReportedBy TWiki:Main.PeterThoeny
Codebase ~twiki4, 6.1.0
SVN Range TWiki-6.1.0-trunk, Mon, 05 Apr 2021, build 31021
AppliesTo Engine
Component Configure
Priority Normal
CurrentState Waiting for Release
WaitingFor

Checkins TWikirev:31049 TWikirev:31050
TargetRelease patch
ReleasedIn 6.1.1
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r4 - 2021-12-05 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback