From 1d52d1a46a92f5689ac6f37ed6672ba0cb98bc2a Mon Sep 17 00:00:00 2001 From: Chang Rebecca Swee Fun Date: Thu, 11 Jan 2018 22:55:21 +0800 Subject: scripts/wic: fix error of import wic module in eSDK environment wic modules in scripts/lib/ are needed for wic to work, but path to the python module is not exported in eSDK environment and we were using an absolutized path of wic script within the sysroots. We now changed to use real script path instead, where the wic modules are located. This will also resolved the tracebacks found when running wic from within the eSDK environment. Traceback (most recent call last): File "/tmp/deploy/sdk/poky_sdk/sysroots/x86_64-pokysdk-linux/usr/bin/wic", line 58, in from wic import WicError ImportError: No module named 'wic' (From OE-Core rev: dcea30b885797ece3439cf1201795a975628d664) Signed-off-by: Chang Rebecca Swee Fun Signed-off-by: Richard Purdie --- scripts/wic | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/wic b/scripts/wic index 293a216d71..d9bea228ad 100755 --- a/scripts/wic +++ b/scripts/wic @@ -40,7 +40,7 @@ from collections import namedtuple from distutils import spawn # External modules -scripts_path = os.path.abspath(os.path.dirname(__file__)) +scripts_path = os.path.dirname(os.path.realpath(__file__)) lib_path = scripts_path + '/lib' sys.path.insert(0, lib_path) import scriptpath -- cgit v1.2.3-54-g00ecf