diff options
| author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2025-09-16 23:19:33 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-10-07 13:53:06 +0100 |
| commit | ea8ed90b8d62e8f08aa383edde56f42693708bb5 (patch) | |
| tree | ab974b4a2e8f85bb84be70aa3d98fdeff5fe6716 /bitbake/lib/bb/parse/parse_py/ConfHandler.py | |
| parent | 9ef953f10d9f83b69bd3187f0690f8b758119ba4 (diff) | |
| download | poky-ea8ed90b8d62e8f08aa383edde56f42693708bb5.tar.gz | |
bitbake: parse: Make include_all support empty variable expansions
include and require support empty variable expansions, typically used
with conditional expansions. However, include_all does not, and instead
reports an error for the first path in BBPATH.
Rewrite include_all so that its behavior matches include and require.
(Bitbake rev: 010928ceac48b20e6ab530f8e256b72201b778ec)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/parse/parse_py/ConfHandler.py')
| -rw-r--r-- | bitbake/lib/bb/parse/parse_py/ConfHandler.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index 9ddbae123d..af3af2ccee 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/lib/bb/parse/parse_py/ConfHandler.py | |||
| @@ -56,7 +56,7 @@ def init(data): | |||
| 56 | def supports(fn, d): | 56 | def supports(fn, d): |
| 57 | return fn[-5:] == ".conf" | 57 | return fn[-5:] == ".conf" |
| 58 | 58 | ||
| 59 | def include(parentfn, fns, lineno, data, error_out): | 59 | def include(parentfn, fns, lineno, data, error_out, all=False): |
| 60 | """ | 60 | """ |
| 61 | error_out: A string indicating the verb (e.g. "include", "inherit") to be | 61 | error_out: A string indicating the verb (e.g. "include", "inherit") to be |
| 62 | used in a ParseError that will be raised if the file to be included could | 62 | used in a ParseError that will be raised if the file to be included could |
| @@ -67,7 +67,11 @@ def include(parentfn, fns, lineno, data, error_out): | |||
| 67 | 67 | ||
| 68 | # "include" or "require" accept zero to n space-separated file names to include. | 68 | # "include" or "require" accept zero to n space-separated file names to include. |
| 69 | for fn in fns.split(): | 69 | for fn in fns.split(): |
| 70 | include_single_file(parentfn, fn, lineno, data, error_out) | 70 | if all: |
| 71 | for path in data.getVar("BBPATH").split(":"): | ||
| 72 | include_single_file(parentfn, os.path.join(path, fn), lineno, data, error_out) | ||
| 73 | else: | ||
| 74 | include_single_file(parentfn, fn, lineno, data, error_out) | ||
| 71 | 75 | ||
| 72 | def include_single_file(parentfn, fn, lineno, data, error_out): | 76 | def include_single_file(parentfn, fn, lineno, data, error_out): |
| 73 | """ | 77 | """ |
