[oe-commits] [openembedded-core] 08/19: oeqa: Set LD_LIBRARY_PATH when executing native commands

git at git.openembedded.org git at git.openembedded.org
Fri Aug 30 12:38:19 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 3a7305bdfded3c8988484c3f430110cc121123b5
Author: Joshua Watt <jpewhacker at gmail.com>
AuthorDate: Tue Aug 27 14:33:47 2019 -0500

    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.
    
    Signed-off-by: Joshua Watt <JPEWhacker at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oeqa/utils/commands.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 0365892..dc1e286 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,
     if native_sysroot:
         extra_paths = "%s/sbin:%s/usr/sbin:%s/usr/bin" % \
                       (native_sysroot, native_sysroot, native_sysroot)
+        extra_libpaths = "%s/lib:%s/usr/lib" % \
+                         (native_sysroot, native_sysroot)
         nenv = dict(options.get('env', os.environ))
         nenv['PATH'] = extra_paths + ':' + nenv.get('PATH', '')
+        nenv['LD_LIBRARY_PATH'] = extra_libpaths + ':' + nenv.get('LD_LIBRARY_PATH', '')
         options['env'] = nenv
 
     cmd = Command(command, timeout=timeout, output_log=output_log, **options)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list