Skip to contentSkip to conversation

shadow: don't install libattr.so.* when xattr not in DISTRO_FEATURES

PATCH New [email protected] 1 participant 1 message Mar 22, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 shadow: don't install libattr.so.* when xattr not in DISTRO_FEATURES

From: Sam Van Den Berge <[email protected]>

Fixes the following issue:

install: cannot stat '.../recipe-sysroot-native/usr/lib/libattr.so.*': No such file or directory
...
ERROR: Task (virtual:native:.../shadow_4.14.2.bb:do_install) failed with exit code '1'

---
 meta/recipes-extended/shadow/shadow.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-extended/shadow/shadow.inc +2 -1
index a164b8347f..40e6ab0b30 100644
@@ -160,7 +160,8 @@ do_install:append:class-native() {
         binaries=$(find ${D}${base_bindir}/ ${D}${base_sbindir}/ ${D}${bindir}/ ${D}${sbindir}/ -executable -type f)
         chrpath -k -r ${STAGING_DIR_NATIVE}/lib-shadow-deps $binaries
         mkdir -p ${D}${STAGING_DIR_NATIVE}/lib-shadow-deps/
-        install ${STAGING_LIBDIR_NATIVE}/libattr.so.* ${STAGING_LIBDIR_NATIVE}/libbsd.so.* ${STAGING_LIBDIR_NATIVE}/libmd.so.* ${D}${STAGING_DIR_NATIVE}/lib-shadow-deps/
+        libattr=${@bb.utils.contains('DISTRO_FEATURES', 'xattr', "${STAGING_LIBDIR_NATIVE}/libattr.so.*", '', d)}
+        install $libattr ${STAGING_LIBDIR_NATIVE}/libbsd.so.* ${STAGING_LIBDIR_NATIVE}/libmd.so.* ${D}${STAGING_DIR_NATIVE}/lib-shadow-deps/
         install ${D}${libdir}/*.so.* ${D}${STAGING_DIR_NATIVE}/lib-shadow-deps/
 }
 
Signature · 1 line
2.34.1