[oe-commits] [openembedded-core] 02/12: scripts/wic: append bitbake executable file path in eSDK environment

git at git.openembedded.org git at git.openembedded.org
Fri Jan 12 08:44:22 UTC 2018


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 89df0d31c9dd22ceba4c95a2a56ca78e58d871a8
Author: Chang Rebecca Swee Fun <rebecca.swee.fun.chang at intel.com>
AuthorDate: Thu Jan 11 22:55:20 2018 +0800

    scripts/wic: append bitbake executable file path in eSDK environment
    
    wic needs a set of tools to be available from sysroots.
    wic will find bitbake executable within the environment,
    and wic was unable to locate bitbake executable within eSDK
    because it wasn't setup with the OE build environment script.
    Hence, we need to add bitbake file path into the environment
    PATH for wic to be able to discover it and import bb modules.
    
    Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 scripts/wic | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/scripts/wic b/scripts/wic
index 0d98875..293a216 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -46,6 +46,18 @@ sys.path.insert(0, lib_path)
 import scriptpath
 scriptpath.add_oe_lib_path()
 
+# Check whether wic is running within eSDK environment
+sdkroot = scripts_path
+if os.environ.get('SDKTARGETSYSROOT'):
+    while sdkroot != '' and sdkroot != os.sep:
+        if os.path.exists(os.path.join(sdkroot, '.devtoolbase')):
+            # .devtoolbase only exists within eSDK
+            # If found, initialize bitbake path for eSDK environment and append to PATH
+            sdkroot = os.path.join(os.path.dirname(scripts_path), 'bitbake', 'bin')
+            os.environ['PATH'] += ":" + sdkroot
+            break
+        sdkroot = os.path.dirname(sdkroot)
+
 bitbake_exe = spawn.find_executable('bitbake')
 if bitbake_exe:
     bitbake_path = scriptpath.add_bitbake_lib_path()

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


More information about the Openembedded-commits mailing list