[bitbake-devel] [PATCH 1/2] ConfHandler.py: allow inherit or include without parameter
Peter Kjellerstedt
peter.kjellerstedt at axis.com
Wed Jun 7 14:47:32 UTC 2017
> -----Original Message-----
> From: bitbake-devel-bounces at lists.openembedded.org [mailto:bitbake-
> devel-bounces at lists.openembedded.org] On Behalf Of Patrick Ohly
> Sent: den 7 juni 2017 15:56
> To: bitbake-devel at lists.openembedded.org
> Subject: [bitbake-devel] [PATCH 1/2] ConfHandler.py: allow inherit or
> include without parameter
Change "inherit or include" to "include or require".
> Writing .bbappends that only have an effect when some configuration
> variable like DISTRO_FEATURES is changed becomes easier when allowing
> "inherit" or "require" without a parameter. The same was already
Change "inherit" to "include".
> 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 at intel.com>
> ---
> lib/bb/parse/parse_py/ConfHandler.py | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/lib/bb/parse/parse_py/ConfHandler.py b/lib/bb/parse/parse_py/ConfHandler.py
> index bf7e985..b006d06 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"))
> --
> git-series 0.9.1
//Peter
More information about the bitbake-devel
mailing list