summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2015-02-02 15:09:25 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-15 15:54:55 +0100
commitc25b0e0ca289f6ad0ed697a0b0252fa48ab5dd0b (patch)
tree126a27f48a4ec2fb1eb2f851378208bc52d39c2b
parent34226a9e02f319a7547967bbdaca3ca918927dd1 (diff)
downloadbitbake-c25b0e0ca289f6ad0ed697a0b0252fa48ab5dd0b.tar.gz
bitbake: data_smart: split expanded removal values when handling _remove
Given these assignments: TEST="a b c d" TEST_remove = "b d" TEST evaluates to "a c". However, if the _remove override is given as a variable: TEST="a b c d" FOO = "b d" TEST_remove = "${FOO} TEST evaluates to "a b c d", because when FOO is expanded it isn't split into a list. Solve this by splitting all members of removeactive once they've been expanded. [ YOCTO #7272 ] (Bitbake rev: 207013b6dde82f9654f9be996695c8335b95a288) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/data_smart.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index 9a42a1706..d4bb98dd7 100644
--- a/lib/bb/data_smart.py
+++ b/lib/bb/data_smart.py
@@ -616,7 +616,8 @@ class DataSmart(MutableMapping):
cachename = var + "[" + flag + "]"
value = self.expand(value, cachename)
if value and flag == "_content" and local_var is not None and "_removeactive" in local_var:
- removes = [self.expand(r) for r in local_var["_removeactive"]]
+ removes = [self.expand(r).split() for r in local_var["_removeactive"]]
+ removes = reduce(lambda a, b: a+b, removes, [])
filtered = filter(lambda v: v not in removes,
value.split())
value = " ".join(filtered)