diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2019-08-27 14:33:47 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-08-30 17:10:28 +0100 |
commit | a0ce9a8bbc5e88ebe965344f01057615aa55fdbc (patch) | |
tree | f3835d49bdee05ca53beec4fb569a57469ed301a /meta | |
parent | 569687083f0f95150da3ccd41a783539d6e2f581 (diff) | |
download | poky-a0ce9a8bbc5e88ebe965344f01057615aa55fdbc.tar.gz |
oeqa: Set LD_LIBRARY_PATH when executing native commands
Some commands like to look for libraries at runtime manually (e.g.
Python's ctype.utils.find_library() function). For this to work
properly, the libraries in the native sysroot must be findable. To
accomplish this, set LD_LIBRARY_PATH to search library paths in the
native sysroot.
(From OE-Core rev: 3a7305bdfded3c8988484c3f430110cc121123b5)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/utils/commands.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py index 03658928e1..dc1e286dac 100644 --- a/meta/lib/oeqa/utils/commands.py +++ b/meta/lib/oeqa/utils/commands.py | |||
@@ -172,8 +172,11 @@ def runCmd(command, ignore_status=False, timeout=None, assert_error=True, | |||
172 | if native_sysroot: | 172 | if native_sysroot: |
173 | extra_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin" % \ | 173 | extra_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin" % \ |
174 | (native_sysroot, native_sysroot, native_sysroot) | 174 | (native_sysroot, native_sysroot, native_sysroot) |
175 | extra_libpaths = "%s/lib:%s/usr/lib" % \ | ||
176 | (native_sysroot, native_sysroot) | ||
175 | nenv = dict(options.get('env', os.environ)) | 177 | nenv = dict(options.get('env', os.environ)) |
176 | nenv['PATH'] = extra_paths + ':' + nenv.get('PATH', '') | 178 | nenv['PATH'] = extra_paths + ':' + nenv.get('PATH', '') |
179 | nenv['LD_LIBRARY_PATH'] = extra_libpaths + ':' + nenv.get('LD_LIBRARY_PATH', '') | ||
177 | options['env'] = nenv | 180 | options['env'] = nenv |
178 | 181 | ||
179 | cmd = Command(command, timeout=timeout, output_log=output_log, **options) | 182 | cmd = Command(command, timeout=timeout, output_log=output_log, **options) |