summaryrefslogtreecommitdiffstats
path: root/lib/bb/data_smart.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-13 08:50:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-13 08:51:49 +0100
commit72a1ca4a104ccab73d6abcbd44db9c2636a58572 (patch)
treebf9a5789dcce755892db7f39b3928ab88972a979 /lib/bb/data_smart.py
parente24095f54c52a547c0462836586a5d716249036e (diff)
downloadopenembedded-core-contrib-72a1ca4a104ccab73d6abcbd44db9c2636a58572.tar.gz
data_smart: Fix remove operator and its interaction with data expansion
If you have: FOO = "${bindir}/X Y" FOO_remove = "${bindir}/X" the expected result is "Y". Currently this doesn't work since the removed expressions are not expanded first. This patch adjusts things so the expressions are expanded before being processed for removal. Also add a test to ensure this case continues to work. [YOCTO #6624] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/data_smart.py')
-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 3d773b1d69..cf8919c64f 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:
- filtered = filter(lambda v: v not in local_var["_removeactive"],
+ removes = [self.expand(r) for r in local_var["_removeactive"]]
+ filtered = filter(lambda v: v not in removes,
value.split(" "))
value = " ".join(filtered)
if expand: