diff mbox series

[meta-networking] mbedtls: Fix warning for missing program

Message ID 20240502121758.9982-1-mark.jonas@de.bosch.com
State Accepted
Headers show
Series [meta-networking] mbedtls: Fix warning for missing program | expand

Commit Message

mark.jonas@de.bosch.com May 2, 2024, 12:17 p.m. UTC
From: Ricardo Simoes <ricardo.simoes@pt.bosch.com>

When PACKAGECONFIG does not contains 'programs', the hello binary will
not be generated, but the ALTERNATIVE 'hello' is still set, causing the
update-alternatives bbclass to generate warnings for the  missing
'hello' binary.

This commit fixes that by only populating ALTERNATIVES when 'programs'
is enabled.

Signed-off-by: Ricardo Simoes <ricardo.simoes@pt.bosch.com>
Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com>
---
 meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.8.bb | 2 +-
 meta-networking/recipes-connectivity/mbedtls/mbedtls_3.6.0.bb  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.8.bb b/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.8.bb
index 301e65598..db79241f2 100644
--- a/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.8.bb
+++ b/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.8.bb
@@ -50,7 +50,7 @@  RPROVIDES:${PN} = "polarssl"
 PACKAGES =+ "${PN}-programs"
 FILES:${PN}-programs = "${bindir}/"
 
-ALTERNATIVE:${PN}-programs = "hello"
+ALTERNATIVE:${PN}-programs = "${@bb.utils.contains('PACKAGECONFIG', 'programs', 'hello', '', d)}"
 ALTERNATIVE_LINK_NAME[hello] = "${bindir}/hello"
 
 BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-networking/recipes-connectivity/mbedtls/mbedtls_3.6.0.bb b/meta-networking/recipes-connectivity/mbedtls/mbedtls_3.6.0.bb
index 92a2de82a..a10fce0ff 100644
--- a/meta-networking/recipes-connectivity/mbedtls/mbedtls_3.6.0.bb
+++ b/meta-networking/recipes-connectivity/mbedtls/mbedtls_3.6.0.bb
@@ -55,7 +55,7 @@  RPROVIDES:${PN} = "polarssl"
 PACKAGES =+ "${PN}-programs"
 FILES:${PN}-programs = "${bindir}/"
 
-ALTERNATIVE:${PN}-programs = "hello"
+ALTERNATIVE:${PN}-programs = "${@bb.utils.contains('PACKAGECONFIG', 'programs', 'hello', '', d)}"
 ALTERNATIVE_LINK_NAME[hello] = "${bindir}/hello"
 
 BBCLASSEXTEND = "native nativesdk"