diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-04-05 22:28:33 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-04-05 22:31:28 +0300 |
commit | 193236933b0f4ab91b1625b64e2187e2db4e0e8f (patch) | |
tree | e12769d7c76d8b0517d6de3d3c72189753d253ed /poky/meta/classes/distro_features_check.bbclass | |
parent | bd93df9478f2f56ffcbc8cb88f1709c735dcd85b (diff) | |
download | openbmc-193236933b0f4ab91b1625b64e2187e2db4e0e8f.tar.xz |
reset upstream subtrees to HEAD
Reset the following subtrees on HEAD:
poky: 8217b477a1(master)
meta-xilinx: 64aa3d35ae(master)
meta-openembedded: 0435c9e193(master)
meta-raspberrypi: 490a4441ac(master)
meta-security: cb6d1c85ee(master)
Squashed patches:
meta-phosphor: drop systemd 239 patches
meta-phosphor: mrw-api: use correct install path
Change-Id: I268e2646d9174ad305630c6bbd3fbc1a6105f43d
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/classes/distro_features_check.bbclass')
-rw-r--r-- | poky/meta/classes/distro_features_check.bbclass | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/poky/meta/classes/distro_features_check.bbclass b/poky/meta/classes/distro_features_check.bbclass index 9b78b03ef6..eeaa3b44cb 100644 --- a/poky/meta/classes/distro_features_check.bbclass +++ b/poky/meta/classes/distro_features_check.bbclass @@ -11,27 +11,22 @@ python () { # Assume at least one var is set. - distro_features = (d.getVar('DISTRO_FEATURES') or "").split() + distro_features = set((d.getVar('DISTRO_FEATURES') or '').split()) - any_of_distro_features = d.getVar('ANY_OF_DISTRO_FEATURES') + any_of_distro_features = set((d.getVar('ANY_OF_DISTRO_FEATURES') or '').split()) 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.SkipRecipe("one of '%s' needs to be in DISTRO_FEATURES" % any_of_distro_features) + if set.isdisjoint(any_of_distro_features, distro_features): + raise bb.parse.SkipRecipe("one of '%s' needs to be in DISTRO_FEATURES" % ' '.join(any_of_distro_features)) - required_distro_features = d.getVar('REQUIRED_DISTRO_FEATURES') + required_distro_features = set((d.getVar('REQUIRED_DISTRO_FEATURES') or '').split()) 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.SkipRecipe("missing required distro feature '%s' (not in DISTRO_FEATURES)" % f) + missing = set.difference(required_distro_features, distro_features) + if missing: + raise bb.parse.SkipRecipe("missing required distro feature%s '%s' (not in DISTRO_FEATURES)" % ('s' if len(missing) > 1 else '', ' '.join(missing))) - conflict_distro_features = d.getVar('CONFLICT_DISTRO_FEATURES') + conflict_distro_features = set((d.getVar('CONFLICT_DISTRO_FEATURES') or '').split()) 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.SkipRecipe("conflicting distro feature '%s' (in DISTRO_FEATURES)" % f) + conflicts = set.intersection(conflict_distro_features, distro_features) + if conflicts: + raise bb.parse.SkipRecipe("conflicting distro feature%s '%s' (in DISTRO_FEATURES)" % ('s' if len(conflicts) > 1 else '', ' '.join(conflicts))) } |