mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-08-28 23:30:21 +00:00
uutils-coreutils: Exclude from world unless it is the selected provider
uutils-coreutils sets PROVIDES/RPROVIDES = "coreutils" and is a drop-in
replacement that cannot coexist with GNU coreutils; both ship the same
update-alternatives links. meta-oe/conf/layer.conf already selects between
them with PREFERRED_PROVIDER_coreutils{,-native,nativesdk-}, defaulting to
GNU coreutils.
PREFERRED_PROVIDER only disambiguates providers reached through a
dependency, not recipes built as explicit targets. Since uutils-coreutils
was in world, 'bitbake world' and 'bitbake universe' pulled both recipes
into the same task graph as targets, so bitbake reported:
NOTE: Multiple .bb files are due to be built which each provide coreutils:
NOTE: Multiple .bb files are due to be built which each provide coreutils-native:
NOTE: Multiple .bb files are due to be built which each provide nativesdk-coreutils:
Key EXCLUDE_FROM_WORLD off the selected provider so only the chosen
implementation is built in world/universe. Building uutils-coreutils
explicitly, or selecting it via PREFERRED_PROVIDER_coreutils, still works.
This follows the existing conditional EXCLUDE_FROM_WORLD idiom used by
mpv, sox and vlc.
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
@@ -18,6 +18,13 @@ require ${BPN}-crates.inc
|
||||
PROVIDES = "coreutils"
|
||||
RPROVIDES:${PN} = "coreutils"
|
||||
|
||||
# This recipe is a drop-in replacement for coreutils and cannot coexist with it,
|
||||
# so only build it in world/universe when it is the selected provider. Otherwise
|
||||
# both recipes end up in the same task graph as explicit targets (PREFERRED_PROVIDER
|
||||
# only disambiguates dependencies, not targets) and bitbake warns that multiple
|
||||
# .bb files provide coreutils.
|
||||
EXCLUDE_FROM_WORLD = "${@'0' if d.getVar('PREFERRED_PROVIDER_coreutils') == 'uutils-coreutils' else '1'}"
|
||||
|
||||
PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux systemd', d)}"
|
||||
PACKAGECONFIG[selinux] = "--features feat_selinux,,clang-native libselinux-native libselinux"
|
||||
PACKAGECONFIG[systemd] = "--features feat_systemd_logind,,systemd"
|
||||
|
||||
Reference in New Issue
Block a user