Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 552238 - app-eselect/eselect-java-0.1.0 - run-java-tool.bash filename breaks BlackBerry 10 Simulator installer
Summary: app-eselect/eselect-java-0.1.0 - run-java-tool.bash filename breaks BlackBerr...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Java (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-16 00:39 UTC by Dennis Schridde
Modified: 2015-06-16 09:56 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Schridde 2015-06-16 00:39:37 UTC
In inspectVM() the BlackBerry 10 Simulator installer v10.3.1 [1] resolves the /usr/bin/java symlink to /usr/libexec/eselect-java/run-java-tool.bash. Then it checks whether it found the Java VM binary, by checking the basename of the resolved name against "java". To confirm this, extract the first 10k lines of the installer and grep for:
elif [ "$inspecteeName" = "java" ]; then

Since Gentoo (app-eselect/eselect-java-0.1.0) names the file "run-java-tool.bash" instead of "java", the test breaks.

Suggestion: Rename /usr/libexec/eselect-java/run-java-tool.bash to /usr/libexec/eselect-java/java, to make scripts, which resolve the symlink and check the resulting filename, happy.

[1]: http://developer.blackberry.com/android/tools/
Comment 1 Dennis Schridde 2015-06-16 00:58:21 UTC
The same think hits us later, at:
resolveLink "$actvm"
actvm="$resolvedLink"

I understand, that run-java-tool.bash needs the name of $0 to dispatch properly, which means that resolving the link will break it. Thus I currently have no suggestion how to fix this correctly.
Comment 2 James Le Cuirot gentoo-dev 2015-06-16 08:48:29 UTC
This sounds pretty dumb. I don't know how resolving the symlink and checking the result is supposed to give any indication that it is a working VM or not. I haven't looked at it but as a workaround, you might be able to run it with PATH=$(java-config -O)/bin:${PATH}.
Comment 3 Dennis Schridde 2015-06-16 09:56:41 UTC
I don't think that will work, as it always resolves the symlink of "java", after searching all dirs in $PATH for it.

But I found another workaround: Running the installer as "./the-installer.bin LAX_VM java" forces the JVM binary to be "java", which makes the symlink resolver fail, so it uses the name directly. Please note that starting it as "./the-installer.bin LAX_VM /usr/bin/java" will not work, as then it will still resolve the symlink of the forced binary.