diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-09-13 08:50:26 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-09-13 08:52:49 +0100 |
commit | fceef0cace6670a8c5f15cd2f31a191176732730 (patch) | |
tree | 44894c81118fc2d4c9a8bce3c94c3dd6f6f17915 /bitbake/lib/bb/data_smart.py | |
parent | 429802fe6691c8a70ec9735c0db4c6a4e1e1b038 (diff) | |
download | poky-fceef0cace6670a8c5f15cd2f31a191176732730.tar.gz |
bitbake: 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]
(Bitbake rev: 72a1ca4a104ccab73d6abcbd44db9c2636a58572)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/data_smart.py')
-rw-r--r-- | bitbake/lib/bb/data_smart.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 3d773b1d69..cf8919c64f 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py | |||
@@ -616,7 +616,8 @@ class DataSmart(MutableMapping): | |||
616 | cachename = var + "[" + flag + "]" | 616 | cachename = var + "[" + flag + "]" |
617 | value = self.expand(value, cachename) | 617 | value = self.expand(value, cachename) |
618 | if value and flag == "_content" and local_var is not None and "_removeactive" in local_var: | 618 | if value and flag == "_content" and local_var is not None and "_removeactive" in local_var: |
619 | filtered = filter(lambda v: v not in local_var["_removeactive"], | 619 | removes = [self.expand(r) for r in local_var["_removeactive"]] |
620 | filtered = filter(lambda v: v not in removes, | ||
620 | value.split(" ")) | 621 | value.split(" ")) |
621 | value = " ".join(filtered) | 622 | value = " ".join(filtered) |
622 | if expand: | 623 | if expand: |