bitbake-setup: Avoid unexpected positional parameter propagation when sourcing scripts
PATCH v2 1/1 bitbake-setup: Avoid unexpected positional parameter propagation when sourcing scripts
From: Changqing Li <[email protected]>
Using set to define positional parameters in the current shell causes those parameters to persist. When another script is sourced in the same shell without explicit arguments, it unexpectedly inherits these positional parameters. This change prevents such unintended propagation.
Signed-off-by Changqing Li <[email protected]>
--- bin/bitbake-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
bin/bitbake-setup +1 -1
@@ -184,7 +184,7 @@ def setup_bitbake_build(bitbake_config, layerdir, setupdir, thisdir, update_bb_c def _make_init_build_env(builddir, oeinitbuildenvdir): builddir = os.path.realpath(builddir) - cmd = "cd {}\nset {}\n. ./oe-init-build-env\n".format(oeinitbuildenvdir, builddir) + cmd = 'cd {}\nset {}\n. ./oe-init-build-env\nset --\n'.format(oeinitbuildenvdir, builddir) initbuild_in_builddir = os.path.join(builddir, 'init-build-env') with open(initbuild_in_builddir, 'w') as f:
Signature · 1 line
2.34.1