[OE-core] [PATCH 1/2] yocto-check-layer-wrapper: Fix path for oe-init-build-env

Robert Yang liezhi.yang at windriver.com
Tue Feb 12 10:16:41 UTC 2019


We only could run it in top of oe-core dir since it assumed oe-init-build-env
was in cwd, this patch fixes the problem.

[YOCTO #13148]

Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
 scripts/yocto-check-layer-wrapper | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/yocto-check-layer-wrapper b/scripts/yocto-check-layer-wrapper
index bbf6ee1..b5df9ce 100755
--- a/scripts/yocto-check-layer-wrapper
+++ b/scripts/yocto-check-layer-wrapper
@@ -30,7 +30,9 @@ cd $base_dir
 
 build_dir=$(mktemp -p $base_dir -d -t build-XXXX)
 
-source oe-init-build-env $build_dir
+this_dir=$(dirname $(readlink -f $0))
+
+source $this_dir/../oe-init-build-env $build_dir
 if [[ $output_log != '' ]]; then
 	yocto-check-layer -o "$output_log" "$*"
 else
-- 
2.7.4



More information about the Openembedded-core mailing list