summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2017-06-07 15:56:24 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-13 10:47:09 +0100
commit6dafbaeff46b2e1682af6d575301e34429cf625e (patch)
treed2279d8503ae9d32d8df010dbc53e6a60f6aea49 /bitbake/lib/bb/parse
parent77a358e41ec1271e6a240aa002ae2daf9e7c3da5 (diff)
downloadpoky-6dafbaeff46b2e1682af6d575301e34429cf625e.tar.gz
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 <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/parse')
-rw-r--r--bitbake/lib/bb/parse/parse_py/ConfHandler.py4
1 files changed, 4 insertions, 0 deletions
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):
81 fn = data.expand(fn) 81 fn = data.expand(fn)
82 parentfn = data.expand(parentfn) 82 parentfn = data.expand(parentfn)
83 83
84 if not fn:
85 # "include" or "require" without parameter is fine, just return.
86 return
87
84 if not os.path.isabs(fn): 88 if not os.path.isabs(fn):
85 dname = os.path.dirname(parentfn) 89 dname = os.path.dirname(parentfn)
86 bbpath = "%s:%s" % (dname, data.getVar("BBPATH")) 90 bbpath = "%s:%s" % (dname, data.getVar("BBPATH"))