]> code.ossystems Code Review - openembedded-core.git/commitdiff
classes/testsdk: do_testsdkext avoid STAGING_DIR/BASE_WORKDIR in PATH
authorAníbal Limón <anibal.limon@linux.intel.com>
Thu, 11 Feb 2016 22:08:05 +0000 (16:08 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 11 Feb 2016 22:33:17 +0000 (22:33 +0000)
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.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/testsdk.bbclass

index 487f40cea4129ca30274c60d6845e9fb85e7abe3..a56ad5edfc7d21cac46d7827c7b037e472796c4b 100644 (file)
@@ -97,9 +97,18 @@ def testsdkext_main(d):
     # extensible sdk shows a warning if found bitbake in the path
     # because can cause problems so clean it
     new_path = ''
+    paths_to_avoid = ['bitbake/bin', 'poky/scripts',
+                       d.getVar('STAGING_DIR', True),
+                       d.getVar('BASE_WORKDIR', True)]
     for p in os.environ['PATH'].split(':'):
-       if 'bitbake/bin' in p or 'poky/scripts' in p:
+       avoid = False
+       for pa in paths_to_avoid:
+           if pa in p:
+              avoid = True
+              break
+       if avoid:
            continue
+
        new_path = new_path + p + ':'
     new_path = new_path[:-1]
     os.environ['PATH'] = new_path