]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
data_smart: Restrict expansion regexp to not include : characters
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 8 Apr 2016 22:47:58 +0000 (23:47 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 9 Apr 2016 06:59:43 +0000 (07:59 +0100)
Bitbake variables don't include ":" characters so exclude these from the variable
expansion regexp.

This assists when parsing shell code which does A=${B:-C} as we don't want a
dependency on a variable called "B:-C".

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/data_smart.py

index d61ad5334ee17acab7ae680e673d5bf024441355..fa1e79427968ac208c0c9a8035304383180638e7 100644 (file)
@@ -40,7 +40,7 @@ logger = logging.getLogger("BitBake.Data")
 
 __setvar_keyword__ = ["_append", "_prepend", "_remove"]
 __setvar_regexp__ = re.compile('(?P<base>.*?)(?P<keyword>_append|_prepend|_remove)(_(?P<add>.*))?$')
-__expand_var_regexp__ = re.compile(r"\${[^{}@\n\t ]+}")
+__expand_var_regexp__ = re.compile(r"\${[^{}@\n\t :]+}")
 __expand_python_regexp__ = re.compile(r"\${@.+?}")
 
 def infer_caller_details(loginfo, parent = False, varval = True):