From: Yoann Congal Date: Fri, 26 Sep 2025 14:53:05 +0000 (+0200) Subject: oe-setup-build: fix dash support X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=35c90011824845b40066b7747b256f1cd31b0dba;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git oe-setup-build: fix dash support Being minimalist, dash does not support the (non-POSIX) feature of passing an argument while sourcing a script. Like in . /oe-init-build-env With dash, one must instead use: cd set # puts in $1 . ./oe-init-build-env # can only be called from its directory in dash oe-setup-build generate a sourcable "init-build-env" script, this script must use the above snippet to be used in dash. Signed-off-by: Yoann Congal Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/scripts/oe-setup-build b/scripts/oe-setup-build index 49603d9fd1..edbcd48355 100755 --- a/scripts/oe-setup-build +++ b/scripts/oe-setup-build @@ -89,7 +89,7 @@ def setup_build_env(args): builddir = args.b if args.b else template["buildpath"] no_shell = args.no_shell coredir = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')) - cmd_base = ". {} {}".format(os.path.join(coredir, 'oe-init-build-env'), os.path.abspath(builddir)) + cmd_base = "cd {}\nset {}\n. ./oe-init-build-env\n".format(coredir, os.path.abspath(builddir)) initbuild = os.path.join(builddir, 'init-build-env') if not os.path.exists(initbuild):