aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-core/cacao/files
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/cacao/files
parent000a7f770faa7312b912937a585185334dec4caf (diff)
downloadmeta-java-1b975523b8d0467b2e3a44097825c30cdc9e3944.tar.gz
meta-java-1b975523b8d0467b2e3a44097825c30cdc9e3944.tar.bz2
meta-java-1b975523b8d0467b2e3a44097825c30cdc9e3944.zip
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/cacao/files')
-rw-r--r--recipes-core/cacao/files/cacao-0.9.8-do-not-rely-on-absolute-paths.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes-core/cacao/files/cacao-0.9.8-do-not-rely-on-absolute-paths.patch b/recipes-core/cacao/files/cacao-0.9.8-do-not-rely-on-absolute-paths.patch
new file mode 100644
index 0000000..93bcc3e
--- /dev/null
+++ b/recipes-core/cacao/files/cacao-0.9.8-do-not-rely-on-absolute-paths.patch
@@ -0,0 +1,33 @@
+java.in: Do not use hardcode paths
+
+Cacao uses hardcoded paths to various files, if these paths are not
+provided. This causes issues when sharing sstate with otherwise
+identical workers, if build time paths are not identical.
+
+Signed-off-by: Erkka Kääriä <erkka.kaaria@intel.com>
+
+Upstream-Status: Inappropriate [Yocto-specific fixes]
+
+---
+ cacao-0.98/src/scripts/java.in | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git cacao-0.98/src/scripts/java.in cacao-0.98/src/scripts/java.in
+index 8a402e4..1738897 100644
+--- cacao-0.98/src/scripts/java.in
++++ cacao-0.98/src/scripts/java.in
+@@ -32,4 +32,10 @@
+ ##
+ ## $Id: java.in 5659 2006-10-04 10:37:09Z twisti $
+
+-exec cacao ${1+"$@"}
++SH_DIR=`dirname "$0"`
++CURRENT_DIR=`cd "${SH_DIR}" && pwd`
++PARENT_DIR=`dirname ${CURRENT_DIR}`
++export BOOTCLASSPATH="${PARENT_DIR}/share/cacao-initial/vm.zip:${PARENT_DIR}/share/classpath-initial/glibj.zip"
++
++LIBRARY_PATH="-Djava.library.path=${PARENT_DIR}/lib/classpath-initial"
++exec cacao ${LIBRARY_PATH} ${1+"$@"}
++
+--
+2.7.4