summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/data_smart.py3
-rw-r--r--bitbake/lib/bb/tests/data.py7
2 files changed, 9 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:
diff --git a/bitbake/lib/bb/tests/data.py b/bitbake/lib/bb/tests/data.py
index 944a906653..9b09ff4c61 100644
--- a/bitbake/lib/bb/tests/data.py
+++ b/bitbake/lib/bb/tests/data.py
@@ -259,6 +259,13 @@ class TestConcatOverride(unittest.TestCase):
259 bb.data.update_data(self.d) 259 bb.data.update_data(self.d)
260 self.assertEqual(self.d.getVar("TEST", True), "") 260 self.assertEqual(self.d.getVar("TEST", True), "")
261 261
262 def test_remove_expansion(self):
263 self.d.setVar("BAR", "Z")
264 self.d.setVar("TEST", "${BAR}/X Y")
265 self.d.setVar("TEST_remove", "${BAR}/X")
266 bb.data.update_data(self.d)
267 self.assertEqual(self.d.getVar("TEST", True), "Y")
268
262class TestOverrides(unittest.TestCase): 269class TestOverrides(unittest.TestCase):
263 def setUp(self): 270 def setUp(self):
264 self.d = bb.data.init() 271 self.d = bb.data.init()