From 981fbbed9cf95d7752ba087272a6b3baf09f3e0c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 31 Oct 2026 23:55:06 -0700 Subject: [PATCH] uutils-coreutils: Only provide coreutils when selected 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 --- .../recipes-core/uutils-coreutils/uutils-coreutils_0.12.0.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.12.0.bb b/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.12.0.bb index 53866d6f80..c647b7764b 100644 --- a/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.12.0.bb +++ b/meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.12.0.bb @@ -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,