aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2019-01-18 21:45:54 +0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-18 17:05:56 +0000
commitdf2ac65370aa86cdbc1574fdede25e3519410e45 (patch)
treeada6845f235098eda30c88ff18ccc2dcd0cfea16
parent610dbee5634677f5055e2b36a3043cd197fb8c51 (diff)
downloadbitbake-contrib-df2ac65370aa86cdbc1574fdede25e3519410e45.tar.gz
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 Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/data_smart.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/data_smart.py b/lib/bb/data_smart.py
index 1f45cd975..07db7be97 100644
--- a/lib/bb/data_smart.py
+++ b/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<base>.*?)(?P<keyword>_append|_prepend|_remove)(_(?P<add>[^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]+')