summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAdrian Herrera <adrian.herrera@arm.com>2021-01-13 13:44:59 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-01-27 09:32:45 +0000
commitf643bfd10eafbc7bcbd7b453b6c7c5b99c20ca8e (patch)
treef6084e6cefe2057ace6b65ab61d71c03f8487dee /scripts
parent60ca60be6fa3a997fb1658e71ab6e1276405c754 (diff)
downloadpoky-f643bfd10eafbc7bcbd7b453b6c7c5b99c20ca8e.tar.gz
scripts: oe-run-native, fix *-native directories
This fixes a crash with "find" when running a native tool and *-native directories do not exist under the binary directory in the sysroot. This happened because the directory wildcard was passed as part of the root directory. The directory wildcard is now passed by "-name", which returns an empty result if no matching directory. (From OE-Core rev: ebc71592b57eba514588693d76057d90f92d6f62) Signed-off-by: Adrian Herrera <adrian.herrera@arm.com> Change-Id: Iba7acd8bbd7e0beb4d25c984f6af7a4fd21486e6 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit f6c90ed0ad24b7d4f892e22e088b1578824eb1d3) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/oe-run-native2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/oe-run-native b/scripts/oe-run-native
index 4e63e69cc4..22958d97e7 100755
--- a/scripts/oe-run-native
+++ b/scripts/oe-run-native
@@ -43,7 +43,7 @@ fi
43OLD_PATH=$PATH 43OLD_PATH=$PATH
44 44
45# look for a tool only in native sysroot 45# look for a tool only in native sysroot
46PATH=$OECORE_NATIVE_SYSROOT/usr/bin:$OECORE_NATIVE_SYSROOT/bin:$OECORE_NATIVE_SYSROOT/usr/sbin:$OECORE_NATIVE_SYSROOT/sbin$(find $OECORE_NATIVE_SYSROOT/usr/bin/*-native -maxdepth 1 -type d -printf ":%p") 46PATH=$OECORE_NATIVE_SYSROOT/usr/bin:$OECORE_NATIVE_SYSROOT/bin:$OECORE_NATIVE_SYSROOT/usr/sbin:$OECORE_NATIVE_SYSROOT/sbin$(find $OECORE_NATIVE_SYSROOT/usr/bin -maxdepth 1 -name "*-native" -type d -printf ":%p")
47tool_find=`/usr/bin/which $tool 2>/dev/null` 47tool_find=`/usr/bin/which $tool 2>/dev/null`
48 48
49if [ -n "$tool_find" ] ; then 49if [ -n "$tool_find" ] ; then