From fceef0cace6670a8c5f15cd2f31a191176732730 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 13 Sep 2014 08:50:26 +0100 Subject: 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 --- bitbake/lib/bb/tests/data.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bitbake/lib/bb/tests/data.py') 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): bb.data.update_data(self.d) self.assertEqual(self.d.getVar("TEST", True), "") + def test_remove_expansion(self): + self.d.setVar("BAR", "Z") + self.d.setVar("TEST", "${BAR}/X Y") + self.d.setVar("TEST_remove", "${BAR}/X") + bb.data.update_data(self.d) + self.assertEqual(self.d.getVar("TEST", True), "Y") + class TestOverrides(unittest.TestCase): def setUp(self): self.d = bb.data.init() -- cgit v1.2.3-54-g00ecf