summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-09 16:38:54 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-12 22:11:43 +0000
commit3a1d9fbe96a6ce836919e5d7c28ac95ab77038a9 (patch)
treeb7486db9d1f5a28ec5712229883526306c405325
parent10e99777da87aa1223a212a8e11551ef93f09660 (diff)
downloadopenembedded-core-contrib-3a1d9fbe96a6ce836919e5d7c28ac95ab77038a9.tar.gz
openembedded-core-contrib-3a1d9fbe96a6ce836919e5d7c28ac95ab77038a9.tar.bz2
openembedded-core-contrib-3a1d9fbe96a6ce836919e5d7c28ac95ab77038a9.zip
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. (From OE-Core rev: ae3c9052e3b1f19c1ceadc5aeb93d4828e1c7a61) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-gnome/gobject-introspection/gobject-introspection_1.46.0.bb4
1 files changed, 4 insertions, 0 deletions
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 d51e607c09..b8b88234e7 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."