diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2022-03-22 01:18:39 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2022-03-23 00:00:00 +0300 |
commit | c9c80b3f8247a3889c1804c6503ea8c215cba006 (patch) | |
tree | 1838911a32d0e89d9ef49106f80db5deb0d7f873 /meta-phosphor/recipes-phosphor/leds | |
parent | d0da820feec582aebc8cdee7ea23b1fd262e09bd (diff) | |
download | openbmc-c9c80b3f8247a3889c1804c6503ea8c215cba006.tar.xz |
phosphor-led-manager: automatically deduce use-{json,yaml}
New systems should be using the 'use-json' model by default, but it
currently requires a bbappend in order to enable it. Automatically
detect based on the PREFERRED_PROVIDER of virtual/...-config-native if
the intended use is JSON or YAML.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ie674d1b901395b4fd41838b6e978ca1ff00b0277
Diffstat (limited to 'meta-phosphor/recipes-phosphor/leds')
-rw-r--r-- | meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb index 90fd49ec53..c481aa5db1 100644 --- a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb @@ -8,8 +8,15 @@ require ${PN}.inc inherit meson pkgconfig python3native inherit obmc-phosphor-dbus-service obmc-phosphor-systemd -PACKAGECONFIG ??= "" -PACKAGECONFIG[use-json] = "-Duse-json=enabled, -Duse-json=disabled" +PACKAGECONFIG ??= "\ + ${@oe.utils.conditional( \ + 'PREFERRED_PROVIDER_virtual/${PN}-config-native', \ + 'phosphor-led-manager-config-example-native', \ + 'use-json', 'use-yaml', d)} \ +" + +PACKAGECONFIG[use-json] = "-Duse-json=enabled,,,,,use-yaml" +PACKAGECONFIG[use-yaml] = "-Duse-json=disabled,,virtual/${PN}-config-native,,,use-json" PACKAGECONFIG[use-lamp-test] = "-Duse-lamp-test=enabled, -Duse-lamp-test=disabled" PACKAGECONFIG[monitor-operational-status] = "-Dmonitor-operational-status=enabled, \ -Dmonitor-operational-status=disabled" @@ -26,8 +33,6 @@ DEPENDS += "phosphor-logging" DEPENDS += "sdbusplus ${PYTHON_PN}-sdbus++-native" DEPENDS += "systemd" -DEPENDS += "virtual/${PN}-config-native" - RDEPENDS:${PN} += "bash" S = "${WORKDIR}/git" |