[gnome-continuous-yocto/gnomeostree-3.28-rocko: 6280/8267] bitbake: ConfHandler.py: allow require or include without parameter
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 6280/8267] bitbake: ConfHandler.py: allow require or include without parameter
- Date: Sun, 17 Dec 2017 04:37:24 +0000 (UTC)
commit 6dafbaeff46b2e1682af6d575301e34429cf625e
Author: Patrick Ohly <patrick ohly intel com>
Date: Wed Jun 7 15:56:24 2017 +0200
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>
bitbake/lib/bb/parse/parse_py/ConfHandler.py | 4 ++++
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 bf7e985..b006d06 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"))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]