To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=77265
                 Issue #|77265
                 Summary|Perl script configure.pl in SDK
               Component|sdk
                 Version|OOo 1.1
                Platform|All
                     URL|
              OS/Version|All
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|PATCH
                Priority|P3
            Subcomponent|tools
             Assigned to|jsc
             Reported by|abonnema





------- Additional comments from [EMAIL PROTECTED] Sat May 12 01:01:52 +0000 
2007 -------
When configuring the 1.1.0 sdk of Open office using Fedora Core 6,
I discovered the perl script configure.pl appears to compare versions in a 
wrong way (as far as I can see, this is not intended).

The script contains the following code at line 360 to test whether a version is 
current enough:

for ($i=0; $i <= $length; $i++ )
        {
                if ( @testVersion->[$i] < @mustBeVersion->[$i] )
                {
                        print "The command '$toolName' has the version 
$tmpTestVersion.\n";
                        print "The SDK requires at least the version 
$tmpMustBeVersion.\n";
                        return 0;
                }
        }

        return 1; # 1 indicates a correct version
}

For java everything from 1.4.1 is handled correctly, but 1.6.0 is deemed not 
current enough. The reason is (obviously) that when reaching the third digit (1 
and 0 respectively), it concludes 1 < 0 is false, so the 1.6.0 must be older.
It should have quit checking when at the second digit (4 and 6 respectively).

I changed the code to contain:

for ($i=0; $i <= $length; $i++ )
        {
                if ( @testVersion->[$i] > @mustBeVersion->[$i] )
                {
                        return 1; # 1 indicates a correct version
                }
                if ( @testVersion->[$i] < @mustBeVersion->[$i] )
                {
                        print "The command '$toolName' has the version 
$tmpTestVersion.\n";
                        print "The SDK requires at least the version 
$tmpMustBeVersion.\n";
                        return 0;
                }
        }

        return 1; # 1 indicates a correct version
}

This code appears to work, but needs to be tested a bit better.
I included the patch (or hope I can include the patch) with this issue.
Not sure whether to call this a PATCH-issue or a DEFECT-issue, decided on 
PATCH.

Guus Bonnema.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to