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

Maanya Goenka
2024-02-01T02:57:38Z

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 --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)}"
--
2.25.1