diff options
author | Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> | 2018-01-11 22:55:21 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-01-12 08:43:54 +0000 |
commit | dcea30b885797ece3439cf1201795a975628d664 (patch) | |
tree | c5e52dd230c47339ff4b697c636238b7768d0cc2 /scripts | |
parent | 89df0d31c9dd22ceba4c95a2a56ca78e58d871a8 (diff) | |
download | openembedded-core-contrib-dcea30b885797ece3439cf1201795a975628d664.tar.gz |
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 <module>
from wic import WicError
ImportError: No module named 'wic'
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/wic | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/wic b/scripts/wic index 293a216d71d..d9bea228ad5 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 |