]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
data_smart: Improve variable expansion regexp
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Sep 2013 07:21:32 +0000 (07:21 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 17 Sep 2013 13:09:37 +0000 (14:09 +0100)
Debugging showed the variable expansion regexp was catching python
expressions (starting with @). Since these are caught by their own
dedicated regexp, stop matching these for the plain variable expansion
for small performance improvements.

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

index 635b2598303f35f6b1252c0fa684d6491d25fb00..9be5d5e270c6d95462d14b1b49416005b0af4519 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"\${[^{}]+}")
+__expand_var_regexp__ = re.compile(r"\${[^{}@]+}")
 __expand_python_regexp__ = re.compile(r"\${@.+?}")
 
 def infer_caller_details(loginfo, parent = False, varval = True):