Apache OpenOffice (AOO) Bugzilla – Issue 90372
Tail command causes versioncheck to fail in setup (shell)
Last modified: 2013-08-07 15:26:05 UTC
Line 393 of the 'setup' script as found in the Opensolaris download states; javaoutput=`$java_runtime -version 2>&1 | tail ${tail_args} -1` This causes the (first & second) lines of 'java -version' output to be discarded. These lines hold the 'java_versions_supported' string (in my case 1.4) that is tested for. Removal of tails' (-1) argument solves the issue (in my case). Why the tail is necessary, I don't know, the code would seem to be able to handle 10+ lines of 'java -version' output. Jaap
@ is: Please have a look.
Trying to look for it in OOo 3.0 timeframe (cws native161)
is -> jaapbril: which java do you use? what is the output of "java -version"? Setting target 3.x.
US$ java -version java version "1.6.0_04" Java(TM) SE Runtime Environment (build 1.6.0_04-b12) Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode) !!! NB I upgraded java (it used to be 1.4)!!! <SETUP> java_versions_supported="1.4 1.5 1.6" sunjavahotspot="HotSpot" check_jre_version() { # check version of an installed JRE javaoutput=`$java_runtime -version 2>&1 | tail ${tail_args} -1` hotspot=`echo $javaoutput | grep $sunjavahotspot` if [ ! -z "$hotspot" ]; then for i in $java_versions_supported; do versionmatch=`echo $javaoutput | grep $i` if [ ! -z "$versionmatch" ]; then java_runtime_sufficient="yes" break fi done fi }
It seems, you have a pretty old version of the setup script. Today we have a new version of check_jre_version() . Can you please check this? check_jre_version() { # check version of an installed JRE javaoutput=`$java_runtime -version 2>&1 | tail ${tail_args} -1` hotspot=`echo $javaoutput | grep $sunjavahotspot` if [ ! -z "$hotspot" ]; then for i in $java_versions_supported; do versionmatch=`echo $javaoutput | grep $i` if [ ! -z "$versionmatch" ]; then java_runtime_sufficient="yes" break fi done # check new version format, where version number is not part of line 3 (1.6) if [ ! "$java_runtime_sufficient" = "yes" ]; then javaoutput=`$java_runtime -version 2>&1 | head ${tail_args} -3` for i in $java_versions_supported; do versionmatch=`echo $javaoutput | grep $i` if [ ! -z "$versionmatch" ]; then java_runtime_sufficient="yes" break fi done fi fi }
Reset assignee on issues not touched by assignee in more than 1000 days.