uutils-coreutils: make selinux PACKAGECONFIG dependend on clang-layer
PATCH 1/1 uutils-coreutils: make selinux PACKAGECONFIG dependend on clang-layer
SELinux layer build fails if 'meta-clang' is not present, which shouldn't happen, since 'meta-clang' isn't a dependency.
If 'selinux' is on DISTRO_FEATURES, PACKAGECONFIG calls 'clang-native' even if uutils-coreutils is not being used (this is enough to make the recipe fails on parsing time if meta-clang is not present).
Make 'selinux' PACKAGECONFIG dependend on clang-layer, and print a warning if the user wants selinux support o uutils-coreutils but haven't add clang-layer.
Signed-off-by Hiago De Franco <[email protected]>
--- .../uutils-coreutils/uutils-coreutils_0.8.0.bb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
meta-oe/recipes-core/uutils-coreutils/uutils-coreutils_0.8.0.bb +11 -1
@@ -18,7 +18,17 @@ require ${BPN}-crates.inc PROVIDES = "coreutils" RPROVIDES:${PN} = "coreutils" -PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'selinux systemd', d)}" +PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +# This is required since uutils-coreutils uses selinux features that require clang-layer +python __anonymous() { + if bb.utils.contains('DISTRO_FEATURES', 'selinux', True, False, d): + if bb.utils.contains('BBFILE_COLLECTIONS', 'clang-layer', True, False, d): + d.appendVar('PACKAGECONFIG', ' selinux') + else: + bb.warn("selinux is enabled but clang-layer is not in BBFILE_COLLECTIONS, " + "selinux support will be disabled. Add meta-clang to your bblayers.conf " + "if selinux support on uutils-coreutils is required.") +} PACKAGECONFIG[selinux] = "--features feat_selinux,,clang-native libselinux-native libselinux" PACKAGECONFIG[systemd] = "--features feat_systemd_logind,,systemd"
Signature · 1 line
2.51.0