[Tinyos-help] tinyos-2 gentoo linux java detection bug (w/patch)
Daniel Goertzen
daniel.goertzen at norscan.com
Tue Jan 9 12:27:58 PST 2007
The utility "tos-locate-jre" yields incorrect results on a gentoo linux
system.
The above utility follows symlinks to determine where the jre is located.
On a gentoo system the jre is selected at runtime by a wrapper script,
therefore symlink following gives a bogus result.
The patch below fixes tos-locate-jre and should continue to work properly on
non-gentoo systems.
Dan.
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tools/tinyos/misc/tos-locate-jre,v
retrieving revision 1.2
diff -u -r1.2 tos-locate-jre
--- tinyos/misc/tos-locate-jre 12 Jul 2006 17:00:50 -0000 1.2
+++ tinyos/misc/tos-locate-jre 9 Jan 2007 20:22:35 -0000
@@ -50,9 +50,13 @@
;;
Linux)
+ # Check gentoo java configuration
+ javapath=`java-config -c 2>/dev/null`
# We check the path first, on the assumption that that's the preferred
# version.
- pathlocate javac || { test -z "$javac" && pathlocate java; }
+ if [ -z "$javapath" ]; then
+ pathlocate javac || { test -z "$javac" && pathlocate java; }
+ fi
if [ -z "$javapath" ]; then
# We try a bunch of standard names, before resorting to rpm -qa
rpmlocate IBMJava2-SDK javac || \
More information about the Tinyos-help
mailing list