@@ -68,6 +68,9 @@ def include(parentfn, fns, lineno, data, error_out, all=False):
# "include" or "require" accept zero to n space-separated file names to include.
for fn in fns.split():
if all:
+ if os.path.isabs(fn):
+ raise ParseError("Incorrect use of include_all with an absolute path %s" % fn, parentfn, lineno)
+
for path in data.getVar("BBPATH").split(":"):
include_single_file(parentfn, os.path.join(path, fn), lineno, data, error_out)
else:
@@ -500,6 +500,7 @@ EXTRA_OECONF:append = " foobar"
test_helper("include_all someother.conf", None)
test_helper("include_all some3.conf", " foobar")
test_helper("include_all ${@''}", None)
+ test_helper("include_all " + tempdir + "/conf2/some.conf", bb.parse.ParseError)
self.d.setVar("BBPATH", tempdir + "/conf2" + ":" + tempdir + "/conf1")
It makes no sense to use an absolute path with include_all. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> --- PATCHv2: Raise an error instead if an absolute path is used with include_all. bitbake/lib/bb/parse/parse_py/ConfHandler.py | 3 +++ bitbake/lib/bb/tests/parse.py | 1 + 2 files changed, 4 insertions(+)