]> code.ossystems Code Review - openembedded-core.git/commit
utils.py: helper function for optional include files
authorPatrick Ohly <patrick.ohly@intel.com>
Fri, 9 Jun 2017 13:04:04 +0000 (15:04 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 12 Jun 2017 14:04:12 +0000 (15:04 +0100)
commit13024ce5aae453769b546d5fbe533443aec3d6fd
tree2ad0b462bbbe5c0e2fbf0c68a46e955e75b76a04
parent3b3ae91a22d6f685e804df4f32cdeebe1bd6bd88
utils.py: helper function for optional include files

The main intention is to provide easy-to-use and read helper functions
for including files only when certain distro features are
set. Functionally they are the same as bb.utils.contains and
bb.utils.contains_any.

Distro features are part of the base configuration and thus safe to
use for conditional inclusion in recipes and bbappends, in contrast to
recipe variables which might still change during parsing. Therefore
the check is limited to DISTRO_FEATURES. This is the reason for having
this in OE-core instead of bitbake.

Default values are set so that no redundant parameters have to be
passed for conditional includes. As a secondary usage, the functions
can also be used in boolean checks.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/utils.py