diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2020-07-09 23:59:54 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2020-08-07 03:20:22 +0300 |
commit | ff92bb65d956b7936b89f41d8ca7d0bce2e54205 (patch) | |
tree | c0d3d32d05c0faa44593312feaffe0d94b44e8b5 /meta-phosphor/classes | |
parent | ef7abcca9d0c9dcb08e19675b76d1fb722ade35d (diff) | |
download | openbmc-ff92bb65d956b7936b89f41d8ca7d0bce2e54205.tar.xz |
meta-phosphor: drop feature check wrappers
These pointless wrappers don't do anything other than obfuscate intent
to readers that have experience with bitbake metadata.
(From meta-phosphor rev: 536cee986517bf14226feb2f412928bc1904f950)
Change-Id: I92b12b6d675acb65d67f442c6331560cb20c88e6
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-phosphor/classes')
-rw-r--r-- | meta-phosphor/classes/obmc-phosphor-image.bbclass | 13 | ||||
-rw-r--r-- | meta-phosphor/classes/obmc-phosphor-utils.bbclass | 16 |
2 files changed, 6 insertions, 23 deletions
diff --git a/meta-phosphor/classes/obmc-phosphor-image.bbclass b/meta-phosphor/classes/obmc-phosphor-image.bbclass index 55b42613b..0e699eec4 100644 --- a/meta-phosphor/classes/obmc-phosphor-image.bbclass +++ b/meta-phosphor/classes/obmc-phosphor-image.bbclass @@ -23,18 +23,17 @@ # - obmc-debug-collector - OpenBMC debug collector inherit core-image -inherit obmc-phosphor-utils LICENSE = "Apache-2.0" FEATURE_PACKAGES_obmc-bmc-state-mgmt ?= "packagegroup-obmc-apps-bmc-state-mgmt" -FEATURE_PACKAGES_obmc-chassis-mgmt ?= "${@cf_enabled(d, 'obmc-phosphor-chassis-mgmt', 'virtual-obmc-chassis-mgmt')}" +FEATURE_PACKAGES_obmc-chassis-mgmt ?= "${@bb.utils.contains('COMBINED_FEATURES', 'obmc-phosphor-chassis-mgmt', 'virtual-obmc-chassis-mgmt', '', d)}" FEATURE_PACKAGES_obmc-chassis-state-mgmt ?= "packagegroup-obmc-apps-chassis-state-mgmt" FEATURE_PACKAGES_obmc-fan-control ?= "packagegroup-obmc-apps-fan-control" -FEATURE_PACKAGES_obmc-fan-mgmt ?= "${@cf_enabled(d, 'obmc-phosphor-fan-mgmt', 'virtual-obmc-fan-mgmt')}" -FEATURE_PACKAGES_obmc-flash-mgmt ?= "${@cf_enabled(d, 'obmc-phosphor-flash-mgmt', 'virtual-obmc-flash-mgmt')}" -FEATURE_PACKAGES_obmc-host-ctl ?= "${@cf_enabled(d, 'obmc-host-ctl', 'virtual-obmc-host-ctl')}" -FEATURE_PACKAGES_obmc-host-ipmi ?= "${@cf_enabled(d, 'obmc-host-ipmi', 'virtual-obmc-host-ipmi-hw')}" +FEATURE_PACKAGES_obmc-fan-mgmt ?= "${@bb.utils.contains('COMBINED_FEATURES', 'obmc-phosphor-fan-mgmt', 'virtual-obmc-fan-mgmt', '', d)}" +FEATURE_PACKAGES_obmc-flash-mgmt ?= "${@bb.utils.contains('COMBINED_FEATURES', 'obmc-phosphor-flash-mgmt', 'virtual-obmc-flash-mgmt', '', d)}" +FEATURE_PACKAGES_obmc-host-ctl ?= "${@bb.utils.contains('COMBINED_FEATURES', 'obmc-host-ctl', 'virtual-obmc-host-ctl', '', d)}" +FEATURE_PACKAGES_obmc-host-ipmi ?= "${@bb.utils.contains('COMBINED_FEATURES', 'obmc-host-ipmi', 'virtual-obmc-host-ipmi-hw', '', d)}" FEATURE_PACKAGES_obmc-host-state-mgmt ?= "packagegroup-obmc-apps-host-state-mgmt" FEATURE_PACKAGES_obmc-inventory ?= "packagegroup-obmc-apps-inventory" FEATURE_PACKAGES_obmc-leds ?= "packagegroup-obmc-apps-leds" @@ -43,7 +42,7 @@ FEATURE_PACKAGES_obmc-remote-logging-mgmt ?= "packagegroup-obmc-apps-remote-logg FEATURE_PACKAGES_obmc-net-ipmi ?= "phosphor-ipmi-net" FEATURE_PACKAGES_obmc-sensors ?= "packagegroup-obmc-apps-sensors" FEATURE_PACKAGES_obmc-software ?= "packagegroup-obmc-apps-software" -FEATURE_PACKAGES_obmc-system-mgmt ?= "${@df_enabled(d, 'obmc-phosphor-system-mgmt', 'virtual-obmc-system-mgmt')}" +FEATURE_PACKAGES_obmc-system-mgmt ?= "${@bb.utils.contains('DISTRO_FEATURES', 'obmc-phosphor-system-mgmt', 'virtual-obmc-system-mgmt', '', d)}" FEATURE_PACKAGES_obmc-debug-collector ?= "packagegroup-obmc-apps-debug-collector" FEATURE_PACKAGES_obmc-settings-mgmt ?= "packagegroup-obmc-apps-settings" FEATURE_PACKAGES_obmc-network-mgmt ?= "packagegroup-obmc-apps-network" diff --git a/meta-phosphor/classes/obmc-phosphor-utils.bbclass b/meta-phosphor/classes/obmc-phosphor-utils.bbclass index 04db8bcd0..7568461e2 100644 --- a/meta-phosphor/classes/obmc-phosphor-utils.bbclass +++ b/meta-phosphor/classes/obmc-phosphor-utils.bbclass @@ -1,19 +1,3 @@ -# Helper functions for checking feature variables. - -def df_enabled(d, feature, truevalue, falsevalue=""): - return bb.utils.contains("DISTRO_FEATURES", feature, truevalue, falsevalue, d) - - -def mf_enabled(d, feature, truevalue, falsevalue=""): - return bb.utils.contains("MACHINE_FEATURES", feature, truevalue, falsevalue, d) - - -def cf_enabled(d, feature, truevalue, falsevalue=""): - return truevalue if df_enabled(d, feature, truevalue) \ - and mf_enabled(d, feature, truevalue) \ - else falsevalue - - def set_append(d, var, val, sep=' '): values = (d.getVar(var, True) or '').split(sep) if filter(bool, values): |