diff mbox series

bash: nativesdk-sdk-provides-dummy RPROVIDES bash for nativesdk already so usrmerge should not

Message ID 20240201025621.1632547-1-maanyagoenka@linux.microsoft.com
State New
Headers show
Series bash: nativesdk-sdk-provides-dummy RPROVIDES bash for nativesdk already so usrmerge should not | expand

Commit Message

Maanya Goenka Feb. 1, 2024, 2:56 a.m. UTC
From: Maanya Goenka <maanyagoenka@microsoft.com>

The package nativesdk-sdk-provides-dummy already provides /bin/sh and /bin/bash
so we prevent re-including them with the usrmerge distro feature to avoid conflicts.

Signed-off-by: Maanya Goenka <maanyagoenka@microsoft.com>
Signed-off-by : Alejandro Hernandez Samaniego <alhe@linux.microsoft.com>
---
 meta/recipes-extended/bash/bash.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-extended/bash/bash.inc b/meta/recipes-extended/bash/bash.inc
index 18874a0e24..94972294d3 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -128,4 +128,6 @@  PACKAGE_BEFORE_PN += "${PN}-loadable"
 RDEPENDS:${PN}-loadable += "${PN}"
 FILES:${PN}-loadable += "${libdir}/bash/*"
 
-RPROVIDES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh /bin/bash', '', d)}"
+# Limit the RPROVIDES here to class target so that if usrmerge is added to the host, it does not also include bash and sh;
+# this is needed because the package 'nativesdk-sdk-provides-dummy' already provides /bin/sh and /bin/bash and we do not want any conflicting RPROVIDES
+RPROVIDES:${PN}:append:class-target = " ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/bin/sh /bin/bash', '', d)}"