summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorS. Lockwood-Childs <sjl@vctlabs.com>2017-07-12 01:36:34 -0700
committerOtavio Salvador <otavio@ossystems.com.br>2017-12-22 10:24:49 -0200
commitaa9de3469e1d34f70e162de0faefb40e634b9dcb (patch)
treec50915969f1f4ac63f9064b58e877f074ef14510
parent00b57035636f67cc39d67ae448bfcba8d7a137ba (diff)
downloadmeta-java-aa9de3469e1d34f70e162de0faefb40e634b9dcb.tar.gz
java-library.bbclass: compatibility with per-recipe sysroots
The removebinaries task was intended to remove pre-built .jar and .class files from the unpacked source, but when per-recipe sysroots were implemented and ended up under WORKDIR, .jar or .class in those sysroots inadvertently started getting killed as well. For instance, ${WORKDIR}/recipe-sysroot-native/usr/share/java/ecj-bootstrap.jar was deleted when attempting to build jlex-native... which made javac in that sysroot rather unhappy. Solve by excluding both recipe-sysroot and recipe-sysroot-native dirs from the search-and-destroy operation. Signed-off-by: S. Lockwood-Childs <sjl@vctlabs.com> Signed-off-by: Maxin B. John <maxin.john@intel.com> (cherry picked from commit c4b9b97c7c60ad5c0c3392ccf143b2e4e6c7df24)
-rw-r--r--classes/java-library.bbclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/classes/java-library.bbclass b/classes/java-library.bbclass
index 58d5a40..ce1cd28 100644
--- a/classes/java-library.bbclass
+++ b/classes/java-library.bbclass
@@ -50,8 +50,10 @@ ALTJARFILENAMES = "${BPN}.jar"
50# Java "source" distributions often contain precompiled things 50# Java "source" distributions often contain precompiled things
51# we want to delete first. 51# we want to delete first.
52do_removebinaries() { 52do_removebinaries() {
53 find ${WORKDIR} -name "*.jar" -exec rm {} \; 53 find ${WORKDIR} ! -path "${RECIPE_SYSROOT}/*" ! -path "${RECIPE_SYSROOT_NATIVE}/*" \
54 find ${WORKDIR} -name "*.class" -exec rm {} \; 54 -name "*.jar" -exec rm {} \;
55 find ${WORKDIR} ! -path "${RECIPE_SYSROOT}/*" ! -path "${RECIPE_SYSROOT_NATIVE}/*" \
56 -name "*.class" -exec rm {} \;
55} 57}
56 58
57addtask removebinaries after do_unpack before do_patch 59addtask removebinaries after do_unpack before do_patch