summaryrefslogtreecommitdiff
path: root/scripts/lib/devtool/__init__.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-04-20 17:47:05 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-24 11:05:56 +0100
commit27942f546e6b08cdf9f2dbda2e24d237cde7f5f5 (patch)
tree995d892d7fbc39e8a9c3e3e733e93db0d4b664ec /scripts/lib/devtool/__init__.py
parent7eba8ba126e8757d0b1d5c3a758748e42c3646ff (diff)
downloadopenembedded-core-27942f546e6b08cdf9f2dbda2e24d237cde7f5f5.tar.gz
openembedded-core-27942f546e6b08cdf9f2dbda2e24d237cde7f5f5.tar.bz2
openembedded-core-27942f546e6b08cdf9f2dbda2e24d237cde7f5f5.zip
devtool: force use of bash when running build within extensible SDK
Ubuntu's default dash shell causes oe-init-build-env to behave a bit differently - (a) it can't pick up the OE root directory and (b) it can't see any build directory specified as a command-line argument (since dash doesn't pass through any arguments specified to sourced scripts). We could work around these but doing so requires some internal knowledge of the script; a much simpler fix is just to force running the command under bash since it's expected to be installed on every distro. Thanks to Chen Qi <Qi.Chen@windriver.com> for this fix. Fixes [YOCTO #7614]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/__init__.py')
-rw-r--r--scripts/lib/devtool/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/lib/devtool/__init__.py b/scripts/lib/devtool/__init__.py
index 3f8158e24a..78ae0aabc8 100644
--- a/scripts/lib/devtool/__init__.py
+++ b/scripts/lib/devtool/__init__.py
@@ -30,6 +30,11 @@ def exec_build_env_command(init_path, builddir, cmd, watch=False, **options):
if not 'cwd' in options:
options["cwd"] = builddir
if init_path:
+ # As the OE init script makes use of BASH_SOURCE to determine OEROOT,
+ # and can't determine it when running under dash, we need to set
+ # the executable to bash to correctly set things up
+ if not 'executable' in options:
+ options['executable'] = 'bash'
logger.debug('Executing command: "%s" using init path %s' % (cmd, init_path))
init_prefix = '. %s %s > /dev/null && ' % (init_path, builddir)
else: