[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4943/8267] bitbake.conf: replace USE_LDCONFIG with new "ldconfig" distro feature



commit 2d1b0452bacb3c51adbf4c525daf36e719630b10
Author: Andre McCurdy <armccurdy gmail com>
Date:   Fri Jan 27 14:29:10 2017 -0800

    bitbake.conf: replace USE_LDCONFIG with new "ldconfig" distro feature
    
    USE_LDCONFIG could previously be set to 0 by distros which do not
    require ldconfig or ld.so.conf on the target. Since more and more
    recipes may need to respect that option, replace the ad-hoc variable
    with a distro feature.
    
    Distros which previously set:
    
      USE_LDCONFIG = "0"
    
    Should now instead use:
    
      DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " ldconfig"
    
    (From OE-Core rev: a905df2dd8f43a2febffa64a39b6e508510326a0)
    
    Signed-off-by: Andre McCurdy <armccurdy gmail com>
    Signed-off-by: Ross Burton <ross burton intel com>
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 meta/classes/package.bbclass              |    5 +----
 meta/conf/bitbake.conf                    |    2 +-
 meta/recipes-core/glibc/glibc-package.inc |    9 +++------
 3 files changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index ac2d71c..d5c2d82 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1618,10 +1618,7 @@ python package_do_shlibs() {
     else:
         snap_symlinks = False
 
-    if (d.getVar('USE_LDCONFIG') or "1") == "1":
-        use_ldconfig = True
-    else:
-        use_ldconfig = False
+    use_ldconfig = bb.utils.contains('DISTRO_FEATURES', 'ldconfig', True, False, d)
 
     needed = {}
     shlib_provider = oe.package.read_shlib_providers(d)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index ade0eff..f9df7ca 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -769,7 +769,7 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS ?= ""
 EXTRA_IMAGE_FEATURES ??= ""
 IMAGE_FEATURES += "${EXTRA_IMAGE_FEATURES}"
 
-DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5 gobject-introspection-data"
+DISTRO_FEATURES_BACKFILL = "pulseaudio sysvinit bluez5 gobject-introspection-data ldconfig"
 MACHINE_FEATURES_BACKFILL = "rtc qemu-usermode"
 
 COMBINED_FEATURES = "${@oe.utils.set_intersect('DISTRO_FEATURES', 'MACHINE_FEATURES', d)}"
diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index f0fc9c1..a674c23 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -14,9 +14,6 @@ python __anonymous () {
                                    d.getVar('TARGET_OS'))
 }
 
-# Set this to zero if you don't want ldconfig in the output package
-USE_LDCONFIG ?= "1"
-
 INHIBIT_SYSROOT_STRIP = "1"
 
 PACKAGES = "${PN}-dbg catchsegv sln nscd ldd tzcode ${PN}-utils glibc-thread-db ${PN}-pic libcidn 
libmemusage libsegfault ${PN}-pcprofile libsotruss ${PN} glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
@@ -37,7 +34,7 @@ libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so ${ba
 libc_baselibs_append_aarch64 = " /lib/ld-linux-aarch64*.so.1"
 INSANE_SKIP_${PN}_append_aarch64 = " libdir"
 
-FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', 
'${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf', '', d)}"
+FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf"
 FILES_ldd = "${bindir}/ldd"
 FILES_libsegfault = "${base_libdir}/libSegFault*"
 FILES_libcidn = "${base_libdir}/libcidn-*.so ${base_libdir}/libcidn.so.*"
@@ -96,8 +93,8 @@ do_install_append () {
                rm -f ${D}${infodir}/dir
        fi
 
-       if [ "${USE_LDCONFIG}" != "1" ]; then
-               # We won't ship these files (see FILES above) so let's not install them
+       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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]