Being minimalist, dash does not support the (non-POSIX) feature of
passing an argument while sourcing a script. Like in
. <some path>/oe-init-build-env <build dir>
With dash, one must instead use:
cd <some path>
set <build dir> # puts <build dir> 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 <yoann.congal@smile.fr>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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):