mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-01 13:58:04 +00:00
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
38 lines
1.7 KiB
Plaintext
38 lines
1.7 KiB
Plaintext
# Allow checking of required and conflicting DISTRO_FEATURES
|
|
#
|
|
# ANY_OF_DISTRO_FEATURES: ensure at least one item on this list is included
|
|
# in DISTRO_FEATURES.
|
|
# REQUIRED_DISTRO_FEATURES: ensure every item on this list is included
|
|
# in DISTRO_FEATURES.
|
|
# CONFLICT_DISTRO_FEATURES: ensure no item in this list is included in
|
|
# DISTRO_FEATURES.
|
|
#
|
|
# Copyright 2013 (C) O.S. Systems Software LTDA.
|
|
|
|
python () {
|
|
# Assume at least one var is set.
|
|
distro_features = (d.getVar('DISTRO_FEATURES') or "").split()
|
|
|
|
any_of_distro_features = d.getVar('ANY_OF_DISTRO_FEATURES')
|
|
if any_of_distro_features:
|
|
any_of_distro_features = any_of_distro_features.split()
|
|
if set.isdisjoint(set(any_of_distro_features),set(distro_features)):
|
|
raise bb.parse.SkipPackage("one of '%s' needs to be in DISTRO_FEATURES" % any_of_distro_features)
|
|
|
|
required_distro_features = d.getVar('REQUIRED_DISTRO_FEATURES')
|
|
if required_distro_features:
|
|
required_distro_features = required_distro_features.split()
|
|
for f in required_distro_features:
|
|
if f in distro_features:
|
|
continue
|
|
else:
|
|
raise bb.parse.SkipPackage("missing required distro feature '%s' (not in DISTRO_FEATURES)" % f)
|
|
|
|
conflict_distro_features = d.getVar('CONFLICT_DISTRO_FEATURES')
|
|
if conflict_distro_features:
|
|
conflict_distro_features = conflict_distro_features.split()
|
|
for f in conflict_distro_features:
|
|
if f in distro_features:
|
|
raise bb.parse.SkipPackage("conflicting distro feature '%s' (in DISTRO_FEATURES)" % f)
|
|
}
|