[oe-commits] [bitbake] branch 1.30 updated: fetch2: Safer check for BB_ORIGENV datastore

git at git.openembedded.org git at git.openembedded.org
Wed Jun 29 18:36:59 UTC 2016


rpurdie pushed a commit to branch 1.30
in repository bitbake.

The following commit(s) were added to refs/heads/1.30 by this push:
       new  2585900   fetch2: Safer check for BB_ORIGENV datastore
2585900 is described below

commit 25859009b710cb35ac8f9ee9eb3a7305f9e13402
Author: Leonardo Sandoval <leonardo.sandoval.gonzalez at linux.intel.com>
AuthorDate: Tue May 3 14:55:48 2016 -0500

    fetch2: Safer check for BB_ORIGENV datastore
    
    BB_ORIGENV value on the datastore can be NoneType thus raising an AttributeError
    exception when calling the getVar method. To avoid this, a check is done before
    accesing it.
    
    [YOCTO #9567]
    
    (Bitbake rev: f368f5ae64a1681873f3d81f3cb8fb38650367b0)
    
    Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster at mvista.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/fetch2/__init__.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index e8fbe89..6ef0c6f 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -813,8 +813,9 @@ def runfetchcmd(cmd, d, quiet=False, cleanup=None):
     if not cleanup:
         cleanup = []
 
+    origenv = d.getVar("BB_ORIGENV", False)
     for var in exportvars:
-        val = d.getVar(var, True) or d.getVar("BB_ORIGENV", False).getVar(var, True)
+        val = d.getVar(var, True) or (origenv and origenv.getVar(var, True))
         if val:
             cmd = 'export ' + var + '=\"%s\"; %s' % (val, cmd)
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list