[poky] [PATCH] meta: toolchain-shar-relocate.sh: Fix for extracting SDK in
Zawadzki, Krzysztof (Nokia - PL/Wroclaw)
krzysztof.zawadzki at nokia.com
Tue Mar 8 07:52:58 PST 2016
Please ignore this patch as it will work for one case. I just realized another scenario where script is run from full path.
Best regards,
Krzysztof Zawadzki
-----Original Message-----
From: poky-bounces at yoctoproject.org [mailto:poky-bounces at yoctoproject.org] On Behalf Of EXT Zawadzki, Krzysztof (Nokia - PL/Wroclaw)
Sent: Tuesday, March 08, 2016 4:41 PM
To: poky at yoctoproject.org
Subject: [poky] [PATCH] meta: toolchain-shar-relocate.sh: Fix for extracting SDK in
If SDK will be extracted in the same folder as sdk shar script. The
shar_relocate will substitute SDK.sh script SDKPATH with extract
destination path.
After that operation no one will be able use this sdk script as paths in
it will be different.
To fix this we need to filter out sdk script and relocate_sdk scripts from
SDKPATH substitution
Signed-off-by: Krzysztof Zawadzki <krzysztof.zawadzki at nokia.com>
diff --git a/meta/files/toolchain-shar-relocate.sh b/meta/files/toolchain-shar-relocate.sh
index 4f34fb4..39319ba 100644
--- a/meta/files/toolchain-shar-relocate.sh
+++ b/meta/files/toolchain-shar-relocate.sh
@@ -47,7 +47,7 @@ for replace in "$target_sdk_dir -maxdepth 1" "$native_sysroot"; do
$SUDO_EXEC find $replace -type f
done | xargs -n100 file | grep ":.*\(ASCII\|script\|source\).*text" | \
awk -F':' '{printf "\"%s\"\n", $1}' | \
- grep -v "$target_sdk_dir/environment-setup-*" | \
+ grep -Ev "$target_sdk_dir/(environment-setup-*|relocate_sdk*|${0:2})" | \
xargs -n100 $SUDO_EXEC sed -i \
-e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:g" \
-e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" \
--
_______________________________________________
poky mailing list
poky at yoctoproject.org
https://lists.yoctoproject.org/listinfo/poky
More information about the poky
mailing list