summaryrefslogtreecommitdiff
path: root/meta-phosphor
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2020-07-09 23:59:54 +0300
committerAndrew Geissler <geissonator@yahoo.com>2020-08-07 03:20:22 +0300
commitff92bb65d956b7936b89f41d8ca7d0bce2e54205 (patch)
treec0d3d32d05c0faa44593312feaffe0d94b44e8b5 /meta-phosphor
parentef7abcca9d0c9dcb08e19675b76d1fb722ade35d (diff)
downloadopenbmc-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')
-rw-r--r--meta-phosphor/classes/obmc-phosphor-image.bbclass13
-rw-r--r--meta-phosphor/classes/obmc-phosphor-utils.bbclass16
-rw-r--r--meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager_git.bb4
3 files changed, 8 insertions, 25 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):
diff --git a/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager_git.bb b/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager_git.bb
index 0766005cc..5fcaa5902 100644
--- a/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager_git.bb
+++ b/meta-phosphor/recipes-phosphor/settings/phosphor-settings-manager_git.bb
@@ -17,7 +17,7 @@ DEPENDS += "${PYTHON_PN}-pyyaml-native"
DEPENDS += "${PYTHON_PN}-mako-native"
DEPENDS += "autoconf-archive-native"
DEPENDS += "virtual/phosphor-settings-defaults"
-DEPENDS += "${@df_enabled(d, 'obmc-mrw', 'phosphor-settings-read-settings-mrw-native')}"
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'obmc-mrw', 'phosphor-settings-read-settings-mrw-native', '', d)}"
DEPENDS += "sdbusplus"
DEPENDS += "phosphor-dbus-interfaces"
DEPENDS += "phosphor-logging"
@@ -47,7 +47,7 @@ python do_merge_settings () {
cmd.append(os.path.join(workdir, 'merge_settings.py'))
cmd.append(os.path.join(settingsdir, 'defaults.yaml'))
# Used for any settings from the MRW
- use_mrw = df_enabled(d, 'obmc-mrw', 'true')
+ use_mrw = bb.utils.contains('DISTRO_FEATURES', 'obmc-mrw', 'true', '', d)
if (use_mrw == 'true'):
cmd.append(os.path.join(settingsdir, 'mrw-settings.override.yaml'))