summaryrefslogtreecommitdiffstats
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
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 @@
1java.in: Do not use hardcode paths
2
3Cacao uses hardcoded paths to various files, if these paths are not
4provided. This causes issues when sharing sstate with otherwise
5identical workers, if build time paths are not identical.
6
7Signed-off-by: Erkka Kääriä <erkka.kaaria@intel.com>
8
9Upstream-Status: Inappropriate [Yocto-specific fixes]
10
11---
12 cacao-0.98/src/scripts/java.in | 8 +++++++-
13 1 file changed, 7 insertions(+), 1 deletion(-)
14
15diff --git cacao-0.98/src/scripts/java.in cacao-0.98/src/scripts/java.in
16index 8a402e4..1738897 100644
17--- cacao-0.98/src/scripts/java.in
18+++ cacao-0.98/src/scripts/java.in
19@@ -32,4 +32,10 @@
20 ##
21 ## $Id: java.in 5659 2006-10-04 10:37:09Z twisti $
22
23-exec cacao ${1+"$@"}
24+SH_DIR=`dirname "$0"`
25+CURRENT_DIR=`cd "${SH_DIR}" && pwd`
26+PARENT_DIR=`dirname ${CURRENT_DIR}`
27+export BOOTCLASSPATH="${PARENT_DIR}/share/cacao-initial/vm.zip:${PARENT_DIR}/share/classpath-initial/glibj.zip"
28+
29+LIBRARY_PATH="-Djava.library.path=${PARENT_DIR}/lib/classpath-initial"
30+exec cacao ${LIBRARY_PATH} ${1+"$@"}
31+
32--
332.7.4