From 7178c69ea26b0887624b470db677050ac6603d7e Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Fri, 18 Jan 2019 21:45:54 +0500 Subject: bitbake: bb.data_smart: only try to expand refs to valid variable names This aligns the behavior of expansion with the recipe parser, only attempting to expand references to valid variable names. This avoids adding references for things like `${foo#${TOPDIR}}` to our vardeps without imposing much additional processing overhead beyond the change to the expansion regexp. YOCTO #12987 (Bitbake rev: df2ac65370aa86cdbc1574fdede25e3519410e45) Signed-off-by: Christopher Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/data_smart.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bitbake/lib/bb/data_smart.py') diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 1f45cd975d..07db7be97a 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py @@ -40,7 +40,7 @@ logger = logging.getLogger("BitBake.Data") __setvar_keyword__ = ["_append", "_prepend", "_remove"] __setvar_regexp__ = re.compile(r'(?P.*?)(?P_append|_prepend|_remove)(_(?P[^A-Z]*))?$') -__expand_var_regexp__ = re.compile(r"\${[^{}@\n\t :]+}") +__expand_var_regexp__ = re.compile(r"\${[a-zA-Z0-9\-_+./~]+?}") __expand_python_regexp__ = re.compile(r"\${@.+?}") __whitespace_split__ = re.compile(r'(\s)') __override_regexp__ = re.compile(r'[a-z0-9]+') -- cgit v1.2.3-54-g00ecf