]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/utils/commands.py: Make a copy of variables in get_bb_vars
authorMariano Lopez <mariano.lopez@linux.intel.com>
Wed, 30 Nov 2016 16:48:21 +0000 (10:48 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 13 Dec 2016 22:47:26 +0000 (22:47 +0000)
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@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/utils/commands.py

index 5cd0f7477baa5bb45f2b2b5b93fb1ff0efd02923..e00c8797aa5fc7e8c0f72deb26645883001fad38 100644 (file)
@@ -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