[oe-commits] [openembedded-core] 21/22: gobject-introspection: Override GIO_MODULE_DIR when scanning

git at git.openembedded.org git at git.openembedded.org
Sat Mar 12 09:19:43 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit a8f9b254e7427c7e1551319b6666260f022aa509
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Mar 9 16:38:54 2016 +0000

    gobject-introspection: Override GIO_MODULE_DIR when scanning
    
    This is to stop GLib linking to GConf and other modules (e.g gnutls).
    
    If for example gconf is installed in the sysroot then GLib will use it by
    default for the GSettings backend.  This will pull a lot more libraries into the
    scanner processes and expands the potential for runtime issues since dependencies
    may be missing of change since they're not in the dependency chain.
    
    Use an invalid modules directory so we avoid loading any modules or the
    libraries they link against which the system may be in the process of rebuilding.
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 .../gobject-introspection/gobject-introspection_1.46.0.bb             | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.46.0.bb b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.46.0.bb
index d51e607..b8b8823 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.46.0.bb
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.46.0.bb
@@ -53,6 +53,10 @@ do_configure_prepend_class-target() {
         qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['\$GIR_EXTRA_LIBS_PATH','.libs','$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}"
         cat > ${B}/g-ir-scanner-qemuwrapper << EOF
 #!/bin/sh
+# Use a modules directory which doesn't exist so we don't load random things
+# which may then get deleted (or their dependencies) and potentially segfault
+export GIO_MODULE_DIR=${STAGING_LIBDIR}/gio/modules-dummy
+
 $qemu_binary "\$@"
 if [ \$? -ne 0 ]; then
     echo "If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the recipe should help."

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list