aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>2018-01-11 22:55:19 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-12 08:43:54 +0000
commit8aba1fd023ce3c6767bf42b9faf9ec14fd7c4d02 (patch)
tree39560ff86ab562573cc1e8192cbde4253433e8f9
parent2134b350c1d5aca1ec0e6f83d90e8c79d9264832 (diff)
downloadopenembedded-core-contrib-8aba1fd023ce3c6767bf42b9faf9ec14fd7c4d02.tar.gz
openembedded-core-contrib-8aba1fd023ce3c6767bf42b9faf9ec14fd7c4d02.tar.bz2
openembedded-core-contrib-8aba1fd023ce3c6767bf42b9faf9ec14fd7c4d02.zip
scripts/wic: use scriptpath module to find bitbake path and oe lib path
Use the scriptpath module in order to standardize the adding of bitbake and meta/lib path to sys.path. Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/wic7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/wic b/scripts/wic
index 097084a6033..0d988757150 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -43,13 +43,12 @@ from distutils import spawn
scripts_path = os.path.abspath(os.path.dirname(__file__))
lib_path = scripts_path + '/lib'
sys.path.insert(0, lib_path)
-oe_lib_path = os.path.join(os.path.dirname(scripts_path), 'meta', 'lib')
-sys.path.insert(0, oe_lib_path)
+import scriptpath
+scriptpath.add_oe_lib_path()
bitbake_exe = spawn.find_executable('bitbake')
if bitbake_exe:
- bitbake_path = os.path.join(os.path.dirname(bitbake_exe), '../lib')
- sys.path.insert(0, bitbake_path)
+ bitbake_path = scriptpath.add_bitbake_lib_path()
from bb import cookerdata
from bb.main import bitbake_main, BitBakeConfigParameters
else: