summaryrefslogtreecommitdiffstats
path: root/recipes-core/ecj/ecj-initial-native.bb
diff options
context:
space:
mode:
authorErkka Kääriä <erkka.kaaria@intel.com>2016-04-29 09:48:19 +0300
committerMaxin B. John <maxin.john@intel.com>2016-04-29 13:17:07 +0300
commit1b975523b8d0467b2e3a44097825c30cdc9e3944 (patch)
treea8b7c140356ed765a6f1455a94fabbf35ad8ec93 /recipes-core/ecj/ecj-initial-native.bb
parent000a7f770faa7312b912937a585185334dec4caf (diff)
downloadmeta-java-1b975523b8d0467b2e3a44097825c30cdc9e3944.tar.gz
java-bootstrapping: Do not rely on hardcoded paths
Various paths to files are hardcoded in either helper scripts or the resulting binaries (like path to Java class libraries). While this works well when using the files on the build machine, things start breaking down when the sstate gets shared between multiple workers in CI, as the paths between workers can differ. Instead of using these hardcoded paths, form the paths at runtime and pass them as parameters when required. Signed-off-by: Erkka Kääriä <erkka.kaaria@intel.com> Signed-off-by: Maxin B. John <maxin.john@intel.com>
Diffstat (limited to 'recipes-core/ecj/ecj-initial-native.bb')
-rw-r--r--recipes-core/ecj/ecj-initial-native.bb9
1 files changed, 8 insertions, 1 deletions
diff --git a/recipes-core/ecj/ecj-initial-native.bb b/recipes-core/ecj/ecj-initial-native.bb
index ed334ed..1792390 100644
--- a/recipes-core/ecj/ecj-initial-native.bb
+++ b/recipes-core/ecj/ecj-initial-native.bb
@@ -21,11 +21,18 @@ JAR = "ecj-bootstrap.jar"
21do_compile() { 21do_compile() {
22 # Create the start script 22 # Create the start script
23 echo "#!/bin/sh" > ecj-initial 23 echo "#!/bin/sh" > ecj-initial
24 echo "ECJ_JAR=${STAGING_DATADIR}/java/${JAR}" >> ecj-initial 24
25 # get absolute path to parent directory, and use that as base path for the jar
26 echo "SH_DIR=\`dirname "\$0"\`" >> ecj-initial
27 echo "CURRENT_DIR=\`cd "\${SH_DIR}" && pwd\`" >> ecj-initial
28 echo "PARENT_DIR=\`dirname \${CURRENT_DIR}\`" >> ecj-initial
29
30 echo "ECJ_JAR=\${PARENT_DIR}/share/java/${JAR}" >> ecj-initial
25 echo "RUNTIME=java-initial" >> ecj-initial 31 echo "RUNTIME=java-initial" >> ecj-initial
26 cat ecj-initial.in >> ecj-initial 32 cat ecj-initial.in >> ecj-initial
27} 33}
28 34
35
29do_install() { 36do_install() {
30 install -d ${D}${bindir} 37 install -d ${D}${bindir}
31 install -m 755 ${S}/ecj-initial ${D}${bindir} 38 install -m 755 ${S}/ecj-initial ${D}${bindir}