From 6dafbaeff46b2e1682af6d575301e34429cf625e Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 7 Jun 2017 15:56:24 +0200 Subject: bitbake: 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)} (Bitbake rev: 8b39c6361758b96fce50a53a6dba8008cd7e6433) Signed-off-by: Patrick Ohly Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/parse_py/ConfHandler.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bitbake/lib/bb/parse') diff --git a/bitbake/lib/bb/parse/parse_py/ConfHandler.py b/bitbake/lib/bb/parse/parse_py/ConfHandler.py index bf7e9859ac..b006d06720 100644 --- a/bitbake/lib/bb/parse/parse_py/ConfHandler.py +++ b/bitbake/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")) -- cgit v1.2.3-54-g00ecf