diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2017-06-07 15:56:24 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-12 15:26:11 +0100 |
commit | 8b39c6361758b96fce50a53a6dba8008cd7e6433 (patch) | |
tree | b7ee03c0d411db4e7a7f8cf70b2c3d6e1ca4f35e /lib/bb/parse/parse_py/ConfHandler.py | |
parent | 92c49b9b1a16dfd35444db8143bd4cae4cda70cc (diff) | |
download | bitbake-8b39c6361758b96fce50a53a6dba8008cd7e6433.tar.gz |
ConfHandler.py: allow require or include without parameter
Writing .bbappends that only have an effect when some configuration
variable like DISTRO_FEATURES is changed becomes easier when allowing
"include" or "require" without a parameter. The same was already
allowed for "inherit".
Then one can write in a .bbappend:
require ${@bb.utils.contains('DISTRO_FEATURES', 'foo', 'bar.inc', '', d)}
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/parse/parse_py/ConfHandler.py')
-rw-r--r-- | lib/bb/parse/parse_py/ConfHandler.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bb/parse/parse_py/ConfHandler.py b/lib/bb/parse/parse_py/ConfHandler.py index bf7e9859a..b006d0672 100644 --- a/lib/bb/parse/parse_py/ConfHandler.py +++ b/lib/bb/parse/parse_py/ConfHandler.py @@ -81,6 +81,10 @@ def include(parentfn, fn, lineno, data, error_out): fn = data.expand(fn) parentfn = data.expand(parentfn) + if not fn: + # "include" or "require" without parameter is fine, just return. + return + if not os.path.isabs(fn): dname = os.path.dirname(parentfn) bbpath = "%s:%s" % (dname, data.getVar("BBPATH")) |