summaryrefslogtreecommitdiffstats
path: root/scripts/wic
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-13 10:15:20 +0000
commitbe5616a27c77d390132f38b1b27af99769aa1155 (patch)
tree3273c7a1e72b9c0ee397893cb5794bfffb12cd22 /scripts/wic
parent288728e030821ae55cff115a0ca96530ca9a14d2 (diff)
downloadpoky-be5616a27c77d390132f38b1b27af99769aa1155.tar.gz
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. (From OE-Core rev: 8aba1fd023ce3c6767bf42b9faf9ec14fd7c4d02) 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/wic')
-rwxr-xr-xscripts/wic7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/wic b/scripts/wic
index 097084a603..0d98875715 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -43,13 +43,12 @@ from distutils import spawn
43scripts_path = os.path.abspath(os.path.dirname(__file__)) 43scripts_path = os.path.abspath(os.path.dirname(__file__))
44lib_path = scripts_path + '/lib' 44lib_path = scripts_path + '/lib'
45sys.path.insert(0, lib_path) 45sys.path.insert(0, lib_path)
46oe_lib_path = os.path.join(os.path.dirname(scripts_path), 'meta', 'lib') 46import scriptpath
47sys.path.insert(0, oe_lib_path) 47scriptpath.add_oe_lib_path()
48 48
49bitbake_exe = spawn.find_executable('bitbake') 49bitbake_exe = spawn.find_executable('bitbake')
50if bitbake_exe: 50if bitbake_exe:
51 bitbake_path = os.path.join(os.path.dirname(bitbake_exe), '../lib') 51 bitbake_path = scriptpath.add_bitbake_lib_path()
52 sys.path.insert(0, bitbake_path)
53 from bb import cookerdata 52 from bb import cookerdata
54 from bb.main import bitbake_main, BitBakeConfigParameters 53 from bb.main import bitbake_main, BitBakeConfigParameters
55else: 54else: