]> code.ossystems Code Review - openembedded-core.git/commitdiff
glibc: Move DISTRO_FEATURE specific do_install code for target recipe only
authorKhem Raj <raj.khem@gmail.com>
Sun, 15 Sep 2019 02:59:21 +0000 (19:59 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Sep 2019 10:45:29 +0000 (11:45 +0100)
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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
s

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/glibc/glibc-package.inc

index 9b1e7b7903d8b79e52caac1a1ff35b5af1f302be..2e8f9f3e024d388019a332245bcebd6e451570c0 100644 (file)
@@ -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,6 +94,26 @@ do_install_append () {
        install -d ${D}${systemd_unitdir}/system
        install -m 0644 ${S}/nscd/nscd.service ${D}${systemd_unitdir}/system/
 
+       # 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
+        # be created.
+
+       if [ -n "${ARCH_DYNAMIC_LOADER}" -a ! -e "${D}${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}" ]; then
+               install -d ${D}${root_prefix}/lib
+               ln -s ${@oe.path.relative('${root_prefix}/lib', '${base_libdir}')}/${ARCH_DYNAMIC_LOADER} \
+                               ${D}${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}
+       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 -" \
@@ -114,18 +126,7 @@ do_install_append () {
                        > ${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
-        # be created.
-
-       if [ -n "${ARCH_DYNAMIC_LOADER}" -a ! -e "${D}${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}" ]; then
-               install -d ${D}${root_prefix}/lib
-               ln -s ${@oe.path.relative('${root_prefix}/lib', '${base_libdir}')}/${ARCH_DYNAMIC_LOADER} \
-                               ${D}${root_prefix}/lib/${ARCH_DYNAMIC_LOADER}
-       fi
 }
-
 do_install_append_aarch64 () {
        do_install_armmultilib
 }