From a99566dac13f0ec1e91fd79c5b78395f3ee0ef56 Mon Sep 17 00:00:00 2001 From: Kai Kang Date: Tue, 11 Apr 2023 17:09:04 +0800 Subject: bitbake: bitbake: ConfHandler: Allow variable flag name with a single character Update regex pattern to allow variable flag name with a single character. Regression tests have also been updated in `bb.parse` and `bin/bitbake-selftest -k ParseTest` has been successfully executed. Eliminate a trailing space as well. (Bitbake rev: bb9e523291a3cad6e1596ee6a1e715b5e5feba8f) Signed-off-by: Kai Kang Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/parse_py/ConfHandler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/bb/parse/parse_py/ConfHandler.py') diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index 05c627ec8b..7826dee7d3 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py @@ -21,7 +21,7 @@ __config_regexp__ = re.compile( r""" ^ (?Pexport\s+)? (?P[a-zA-Z0-9\-_+.${}/~:]+?) - (\[(?P[a-zA-Z0-9\-_+.][a-zA-Z0-9\-_+.@]+)\])? + (\[(?P[a-zA-Z0-9\-_+.][a-zA-Z0-9\-_+.@]*)\])? \s* ( (?P:=) | @@ -103,7 +103,7 @@ def include_single_file(parentfn, fn, lineno, data, error_out): # We have an issue where a UI might want to enforce particular settings such as # an empty DISTRO variable. If configuration files do something like assigning # a weak default, it turns out to be very difficult to filter out these changes, -# particularly when the weak default might appear half way though parsing a chain +# particularly when the weak default might appear half way though parsing a chain # of configuration files. We therefore let the UIs hook into configuration file # parsing. This turns out to be a hard problem to solve any other way. confFilters = [] -- cgit v1.2.3-54-g00ecf