aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-25 16:45:23 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-25 16:46:47 +0100
commitb247392b4ced57cfe694656032f6a6723740a9e8 (patch)
tree04c955fb568206ab7411190ea15d34cade000e02 /meta
parent39c1719a32ed5567e3bf2df5c4f9068d0f5a9400 (diff)
downloadopenembedded-core-contrib-b247392b4ced57cfe694656032f6a6723740a9e8.tar.gz
Revert "relocate_sdk.py: remove hardcoded SDK path"
This reverts commit 6671a4d980c8bef8f402780a308f6c43a25044aa. This breaks uninative tarball since the call of relocate_sdk.py from uninative.bbclass wasn't updated to account for this change. It isn't clear what value that code could pass in and this isn't simple to fix so revert until a better fix can be found that doesn't break uninative. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/populate_sdk_base.bbclass5
-rw-r--r--meta/files/toolchain-shar-relocate.sh2
2 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index e27ee036a2..7ffaf84a45 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -161,6 +161,11 @@ do_populate_sdk[stamp-extra-info] = "${MACHINE_ARCH}${SDKMACHINE}"
fakeroot create_sdk_files() {
cp ${COREBASE}/scripts/relocate_sdk.py ${SDK_OUTPUT}/${SDKPATH}/
+
+ # Replace the ##DEFAULT_INSTALL_DIR## with the correct pattern.
+ # Escape special characters like '+' and '.' in the SDKPATH
+ escaped_sdkpath=$(echo ${SDKPATH} |sed -e "s:[\+\.]:\\\\\\\\\0:g")
+ sed -i -e "s:##DEFAULT_INSTALL_DIR##:$escaped_sdkpath:" ${SDK_OUTPUT}/${SDKPATH}/relocate_sdk.py
}
python check_sdk_sysroots() {
diff --git a/meta/files/toolchain-shar-relocate.sh b/meta/files/toolchain-shar-relocate.sh
index f82ff2be48..e3c10018ef 100644
--- a/meta/files/toolchain-shar-relocate.sh
+++ b/meta/files/toolchain-shar-relocate.sh
@@ -36,7 +36,7 @@ if [ x\${PYTHON} = "x" ]; then
echo "SDK could not be relocated. No python found."
exit 1
fi
-\${PYTHON} ${env_setup_script%/*}/relocate_sdk.py $DEFAULT_INSTALL_DIR $target_sdk_dir $dl_path $executable_files
+\${PYTHON} ${env_setup_script%/*}/relocate_sdk.py $target_sdk_dir $dl_path $executable_files
EOF
$SUDO_EXEC mv $tdir/relocate_sdk.sh ${env_setup_script%/*}/relocate_sdk.sh