diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-04-20 17:47:05 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-15 18:12:45 +0100 |
commit | d730e14639c01914fc7f86a80010cd698a536b1e (patch) | |
tree | 6b391b96d5242b157194d1dbfdff80b3b29e4113 /scripts/lib | |
parent | 75a982e74fd67535ed89db58bb1f938097cd19b1 (diff) | |
download | poky-d730e14639c01914fc7f86a80010cd698a536b1e.tar.gz |
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].
(From OE-Core rev: 27942f546e6b08cdf9f2dbda2e24d237cde7f5f5)
(From OE-Core rev: f83f108f83766d4c141946084b7c4be730c2865e)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/devtool/__init__.py | 5 |
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): | |||
30 | if not 'cwd' in options: | 30 | if not 'cwd' in options: |
31 | options["cwd"] = builddir | 31 | options["cwd"] = builddir |
32 | if init_path: | 32 | if init_path: |
33 | # As the OE init script makes use of BASH_SOURCE to determine OEROOT, | ||
34 | # and can't determine it when running under dash, we need to set | ||
35 | # the executable to bash to correctly set things up | ||
36 | if not 'executable' in options: | ||
37 | options['executable'] = 'bash' | ||
33 | logger.debug('Executing command: "%s" using init path %s' % (cmd, init_path)) | 38 | logger.debug('Executing command: "%s" using init path %s' % (cmd, init_path)) |
34 | init_prefix = '. %s %s > /dev/null && ' % (init_path, builddir) | 39 | init_prefix = '. %s %s > /dev/null && ' % (init_path, builddir) |
35 | else: | 40 | else: |