@@ -15,7 +15,10 @@ SRCREV = "dc1efd89948a9ca4c78c3a4b9a6ac891019a8c69"
require ${BPN}-crates.inc
-PROVIDES = "coreutils"
+# Only claim coreutils when selected, separately for each of the target, native
+# and nativesdk variants. Unlike world, universe builds every recipe, so an
+# unconditional PROVIDES makes both recipes provide coreutils in the same build.
+PROVIDES = "${@'coreutils' if d.getVar('PREFERRED_PROVIDER_' + d.getVar('PN').replace('uutils-', '')) == d.getVar('PN') else ''}"
RPROVIDES:${PN} = "coreutils"
# This recipe is a drop-in replacement for coreutils and cannot coexist with it,
Universe builds every recipe and ignores EXCLUDE_FROM_WORLD, so the unconditional PROVIDES puts this recipe and GNU coreutils in the same build, and bitbake -c fetch universe reports that multiple .bb files provide coreutils, coreutils-native and nativesdk-coreutils. Claim the name only when this recipe is the preferred provider, checked separately for the target, native and nativesdk variants so they can still be selected independently. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> --- .../recipes-core/uutils-coreutils/uutils-coreutils_0.12.0.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)