1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-16 03:47:03 +00:00

bitbake: parse: Add include_all conf file directive

In some cases it would be helpful to be able to have an include file
in a standard location which is included in all layers that are added
to the system. The intent is for these to provide configuration tweaks
of specific types so that a given file pattern can be adopted more widely
for such configuration.

The code will search for any named configuration file within BBPATH, so
a configuration directive of:

include_all conf/distro/include/myinc.conf

would include the myinc.conf file in that subpath if present in any
directory in BBPATH. Multiple files will be included if present.

(Bitbake rev: d01d5593e7829ac60f37bc23cb87dc6917026471)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2024-12-14 20:03:17 +08:00
parent 9d1b31d254
commit 5cb3d1a59c
2 changed files with 24 additions and 0 deletions
@@ -43,6 +43,7 @@ __config_regexp__ = re.compile( r"""
""", re.X)
__include_regexp__ = re.compile( r"include\s+(.+)" )
__require_regexp__ = re.compile( r"require\s+(.+)" )
__includeall_regexp__ = re.compile( r"include_all\s+(.+)" )
__export_regexp__ = re.compile( r"export\s+([a-zA-Z0-9\-_+.${}/~]+)$" )
__unset_regexp__ = re.compile( r"unset\s+([a-zA-Z0-9\-_+.${}/~]+)$" )
__unset_flag_regexp__ = re.compile( r"unset\s+([a-zA-Z0-9\-_+.${}/~]+)\[([a-zA-Z0-9\-_+.][a-zA-Z0-9\-_+.@]+)\]$" )
@@ -178,6 +179,11 @@ def feeder(lineno, s, fn, statements, baseconfig=False, conffile=True):
ast.handleInclude(statements, fn, lineno, m, True)
return
m = __includeall_regexp__.match(s)
if m:
ast.handleIncludeAll(statements, fn, lineno, m)
return
m = __export_regexp__.match(s)
if m:
ast.handleExport(statements, fn, lineno, m)