@@ -31,7 +31,7 @@ from bb.COW import COWDictBase
logger = logging.getLogger("BitBake.Data")
__setvar_keyword__ = [":append", ":prepend", ":remove"]
-__setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>:append|:prepend|:remove)(:(?P<add>[^A-Z]*))?$')
+__setvar_regexp__ = re.compile(r'(?P<base>.*?)(?P<keyword>:append|:prepend|:remove)(:(?P<add>[^A-Z$]*))?$')
__expand_var_regexp__ = re.compile(r"\${[a-zA-Z0-9\-_+./~:]+}")
__expand_python_regexp__ = re.compile(r"\${@(?:{.*?}|.)+?}")
__whitespace_split__ = re.compile(r'(\s)')
@@ -417,7 +417,6 @@ class TestOverrides(unittest.TestCase):
self.assertEqual(self.d.getVar("TEST"), "base appended")
# Test an :append whose override name is lowercase
- @unittest.expectedFailure
def test_append_in_expanded_lowercase_override(self):
self.d.setVar("machine", "qemux86")
self.d.setVar("PN", "gizmo")
In original code, in a setVar call for, say, "TEST:foo-${MACHINE}", the __setvar_regexp__ regexp does not match *because of capitals*, so it stores a variable name including $ and caps. Later during finalization expandKeys then calls renameVar and setVar, at which point the regexp matches and the override is detected. The reason why this works is not because there is a variable in the override text, but because there are uppercase letters, so it would break with lowercase, as well as if we want to change the regexp to allow uppercase in an override string. Signed-off-by: Yann Dirson <yann.dirson@vates.tech> Assisted-by: Claude Opus 5.5 --- lib/bb/data_smart.py | 2 +- lib/bb/tests/data.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)