[oe-commits] [openembedded-core] 04/63: oeqa/utils/commands.py: Make a copy of variables in get_bb_vars

git at git.openembedded.org git at git.openembedded.org
Tue Dec 13 22:56:22 UTC 2016


rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 22b7fa24fefcc3974806d1b282c93b8c5880f6a4
Author: Mariano Lopez <mariano.lopez at linux.intel.com>
AuthorDate: Wed Nov 30 10:48:21 2016 -0600

    oeqa/utils/commands.py: Make a copy of variables in get_bb_vars
    
    The function get_bb_vars will remove items for the list passed
    as the function argument, this will leave the caller with an
    empty list and the function never says it will consume the items.
    
    This hasn't been found before because only get_bb_var uses this
    function.
    
    Signed-off-by: Mariano Lopez <mariano.lopez at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 meta/lib/oeqa/utils/commands.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/lib/oeqa/utils/commands.py b/meta/lib/oeqa/utils/commands.py
index 5cd0f74..e00c879 100644
--- a/meta/lib/oeqa/utils/commands.py
+++ b/meta/lib/oeqa/utils/commands.py
@@ -149,6 +149,7 @@ def get_bb_vars(variables=None, target=None, postconfig=None):
     """Get values of multiple bitbake variables"""
     bbenv = get_bb_env(target, postconfig=postconfig)
 
+    variables = variables.copy()
     var_re = re.compile(r'^(export )?(?P<var>\w+)="(?P<value>.*)"$')
     unset_re = re.compile(r'^unset (?P<var>\w+)$')
     lastline = None

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


More information about the Openembedded-commits mailing list