diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2016-02-11 16:08:05 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-11 22:33:40 +0000 |
commit | 5e978d7ed89fe028a8d01221bcda7f9edca35d08 (patch) | |
tree | 8ed20e1f206b91a2a37416b7962a2c707dbc47cd | |
parent | f56e9aa9a0c6e37ae5703d1923c5bda79ca1327a (diff) | |
download | poky-5e978d7ed89fe028a8d01221bcda7f9edca35d08.tar.gz |
classes/testsdk: do_testsdkext avoid STAGING_DIR/BASE_WORKDIR in PATH
The inclusion of STAGING_DIR/BASE_WORKDIR in PATH is contaminating
the environment, i.e. when try to sanity check perl (check_perl_modules)
it takes perl from STAGING_DIR causing eSDK install to fail.
(From OE-Core rev: 32611395e1da21f6f7f7916fb8077e35ee81bb23)
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/testsdk.bbclass | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass index 487f40cea4..a56ad5edfc 100644 --- a/meta/classes/testsdk.bbclass +++ b/meta/classes/testsdk.bbclass | |||
@@ -97,9 +97,18 @@ def testsdkext_main(d): | |||
97 | # extensible sdk shows a warning if found bitbake in the path | 97 | # extensible sdk shows a warning if found bitbake in the path |
98 | # because can cause problems so clean it | 98 | # because can cause problems so clean it |
99 | new_path = '' | 99 | new_path = '' |
100 | paths_to_avoid = ['bitbake/bin', 'poky/scripts', | ||
101 | d.getVar('STAGING_DIR', True), | ||
102 | d.getVar('BASE_WORKDIR', True)] | ||
100 | for p in os.environ['PATH'].split(':'): | 103 | for p in os.environ['PATH'].split(':'): |
101 | if 'bitbake/bin' in p or 'poky/scripts' in p: | 104 | avoid = False |
105 | for pa in paths_to_avoid: | ||
106 | if pa in p: | ||
107 | avoid = True | ||
108 | break | ||
109 | if avoid: | ||
102 | continue | 110 | continue |
111 | |||
103 | new_path = new_path + p + ':' | 112 | new_path = new_path + p + ':' |
104 | new_path = new_path[:-1] | 113 | new_path = new_path[:-1] |
105 | os.environ['PATH'] = new_path | 114 | os.environ['PATH'] = new_path |