[oe] [meta-java][PATCH 01/15] java.bbclass: java missing classes during compile

jackie.huang at windriver.com jackie.huang at windriver.com
Fri Dec 25 07:56:21 UTC 2015


From: Amy Fong <amy.fong at windriver.com>

oe_makeclasspath is used to define the classpath argument passed to
javac for a number of packages. The current behaviour takes a number
args specifying jar files to look for and if the files exist, it adds
it to a specified variable.

On some builds, oe_makeclasspath cannot find the jar file.

oe_makeclasspath used an invalid test to see the package is native.
(testing if the build arch and package arch are the same, if so, native)
We test to see if PN matches *-native or *-nativesdk instead.

Signed-off-by: Amy Fong <amy.fong at windriver.com>
Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
---
 classes/java.bbclass | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/classes/java.bbclass b/classes/java.bbclass
index 464d8a8..ab51787 100644
--- a/classes/java.bbclass
+++ b/classes/java.bbclass
@@ -98,11 +98,14 @@ oe_makeclasspath() {
       case "$1" in
           -s)
               # take jar files from native staging if this is a -native recipe
-              if [ ${PACKAGE_ARCH} = ${BUILD_ARCH} ]; then
+              case "$PN" in
+              *-native|*-nativesdk)
                   dir=${STAGING_DATADIR_JAVA_NATIVE}
-              else
+                  ;;
+              *)
                   dir=${STAGING_DATADIR_JAVA}
-              fi
+                  ;;
+              esac
               ;;
           -*)
               bbfatal "oe_makeclasspath: unknown option: $1"
-- 
1.9.1




More information about the Openembedded-devel mailing list