]> code.ossystems Code Review - openembedded-core.git/commitdiff
gobject-introspection: Ensure prelink config file exists to avoid build failures
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 17 Aug 2016 11:53:16 +0000 (12:53 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 18 Aug 2016 08:27:13 +0000 (09:27 +0100)
gobject-introspection relies upon prelink-rtld. In order to function correctly,
we generate an ld.so.conf file which is generated before users of prelink-rtld
are called.

There is currently a race in gobject-introspection since the configuration file
may not have been created. This adds in code to ensure that regardless of codepath
(new build, existing build, from sstate), we trigger the creation of the configuration
file and avoid build failures.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-gnome/gobject-introspection/gobject-introspection_1.48.0.bb

index 6948aff2faea62ac78c1716574635d753913d206..eca6ce00a0f61e3d3cbc5429102b303531dc27e5 100644 (file)
@@ -158,3 +158,16 @@ gi_binaries_sysroot_preprocess() {
            -e "s|g_ir_compiler=.*|g_ir_compiler=${bindir}/g-ir-compiler-wrapper|" \
            ${SYSROOT_DESTDIR}${libdir}/pkgconfig/gobject-introspection-1.0.pc
 }
+
+# Need to ensure ld.so.conf exists so prelink-native works
+# both before we build and if we install from sstate
+do_configure[prefuncs] += "gobject_introspection_preconfigure"
+python gobject_introspection_preconfigure () {
+    oe.utils.write_ld_so_conf(d)
+}
+
+SSTATEPOSTINSTFUNCS += "gobject_introspection_postinst"
+python gobject_introspection_postinst () {
+    if d.getVar("BB_CURRENTTASK", True).startswith("populate_sysroot"):
+        oe.utils.write_ld_so_conf(d)
+}