From d2096315b67e121dc47cfd0cf8b0c9e0af76fafc Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 14 Sep 2019 19:59:21 -0700 Subject: [PATCH] glibc: Move DISTRO_FEATURE specific do_install code for target recipe only nativesdk-glibc should be spared of recompile when the distro features are changed e.g. ldconfig is not in DISTRO_FEATURES, this happens when sdk with musl and another one with glibc is built Fixes Variable do_install value changed: ... -DISTRO_FEATURES{ldconfig} = Set +DISTRO_FEATURES{ldconfig} = Unset (From OE-Core rev: e7af0204e6051489ef5646fbca2509a42e04bb72) Signed-off-by: Khem Raj s Signed-off-by: Richard Purdie --- meta/recipes-core/glibc/glibc-package.inc | 41 ++++++++++++----------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc index 9b1e7b7903..2e8f9f3e02 100644 --- a/meta/recipes-core/glibc/glibc-package.inc +++ b/meta/recipes-core/glibc/glibc-package.inc @@ -83,14 +83,6 @@ do_install_append () { rm -f ${D}${infodir}/dir fi - if ! ${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', 'true', 'false', d)}; then - # The distro doesn't want these files so let's not install them - rm -f ${D}${sysconfdir}/ld.so.conf - rm -f ${D}${base_sbindir}/ldconfig - # This directory will be empty now so remove it too. - rmdir ${D}${sysconfdir} - fi - install -d ${D}${sysconfdir}/init.d install -d ${D}${localstatedir}/db/nscd install -m 0755 ${S}/nscd/nscd.init ${D}${sysconfdir}/init.d/nscd @@ -102,18 +94,6 @@ do_install_append () { install -d ${D}${systemd_unitdir}/system install -m 0644 ${S}/nscd/nscd.service ${D}${systemd_unitdir}/system/ - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/tmpfiles.d - echo "d /run/nscd 755 root root -" \ - > ${D}${sysconfdir}/tmpfiles.d/nscd.conf - fi - - if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/default/volatiles - echo "d root root 0755 /var/run/nscd none" \ - > ${D}${sysconfdir}/default/volatiles/98_nscd - fi - # The dynamic loader will have been installed into # ${base_libdir}. However, if that isn't going to end up being # available in the ABI-mandated location, then a symlink must @@ -126,6 +106,27 @@ do_install_append () { fi } +do_install_append_class-target() { + if ! ${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', 'true', 'false', d)}; then + # The distro doesn't want these files so let's not install them + rm -f ${D}${sysconfdir}/ld.so.conf + rm -f ${D}${base_sbindir}/ldconfig + # This directory will be empty now so remove it too. + rmdir ${D}${sysconfdir} + fi + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/tmpfiles.d + echo "d /run/nscd 755 root root -" \ + > ${D}${sysconfdir}/tmpfiles.d/nscd.conf + fi + + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/default/volatiles + echo "d root root 0755 /var/run/nscd none" \ + > ${D}${sysconfdir}/default/volatiles/98_nscd + fi + +} do_install_append_aarch64 () { do_install_armmultilib }