[oe-commits] Richard Purdie : gconf: Ensure the correct backend directory is used

git at git.openembedded.org git at git.openembedded.org
Wed Nov 23 16:57:47 UTC 2011


Module: openembedded-core.git
Branch: master-next
Commit: aaa2a70f7f1b8a299f31626d61d7ea27f29fb9e2
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=aaa2a70f7f1b8a299f31626d61d7ea27f29fb9e2

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Wed Nov 23 15:05:39 2011 +0000

gconf: Ensure the correct backend directory is used

Without these changes, gconf will use the hardcoded backend directory meaning
we can see errors when building if the binary was relocated.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/gconf.bbclass                         |    1 +
 .../gnome/gconf-3.2.3/backenddir.patch             |   43 ++++++++++++++++++++
 meta/recipes-gnome/gnome/gconf_3.2.3.bb            |    5 ++-
 3 files changed, 48 insertions(+), 1 deletions(-)

diff --git a/meta/classes/gconf.bbclass b/meta/classes/gconf.bbclass
index 71926b7..f164547 100644
--- a/meta/classes/gconf.bbclass
+++ b/meta/classes/gconf.bbclass
@@ -3,6 +3,7 @@ DEPENDS += "gconf gconf-native"
 # This is referenced by the gconf m4 macros and would default to the value hardcoded
 # into gconf at compile time otherwise
 export GCONF_SCHEMA_INSTALL_SOURCE = "xml:merged:${STAGING_DIR_NATIVE}${sysconfdir}/gconf/gconf.xml.defaults"
+export GCONF_BACKEND_DIR = "${STAGING_LIBDIR_NATIVE}/GConf/2"
 
 gconf_postinst() {
 if [ "x$D" != "x" ]; then
diff --git a/meta/recipes-gnome/gnome/gconf-3.2.3/backenddir.patch b/meta/recipes-gnome/gnome/gconf-3.2.3/backenddir.patch
new file mode 100644
index 0000000..4baf905
--- /dev/null
+++ b/meta/recipes-gnome/gnome/gconf-3.2.3/backenddir.patch
@@ -0,0 +1,43 @@
+Allow the backend directory to be specified from the environment. This is 
+required so we can relocate gconf-native to different paths and still
+allow it to work.
+
+Upstream-Status: Pending
+
+RP 2011/11/23
+
+Index: GConf-3.2.3/gconf/gconf-backend.c
+===================================================================
+--- GConf-3.2.3.orig/gconf/gconf-backend.c	2011-07-01 14:01:20.000000000 +0100
++++ GConf-3.2.3/gconf/gconf-backend.c	2011-11-23 14:56:37.141293320 +0000
+@@ -21,6 +21,7 @@
+ #include <config.h>
+ #include "gconf-backend.h"
+ #include "gconf-internals.h"
++#include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/stat.h>
+@@ -171,6 +172,7 @@
+   gchar* back;
+   gchar* file;
+   gchar* retval;
++  const gchar* backenddir;
+ 
+   g_return_val_if_fail(address != NULL, NULL);
+ 
+@@ -179,9 +181,13 @@
+   if (back == NULL)
+     return NULL;
+ 
++  backenddir = getenv("GCONF_BACKEND_DIR");
++  if (backenddir == NULL)
++    backenddir = GCONF_BACKEND_DIR;
++
+   file = g_strconcat("gconfbackend-", back, NULL);
+   
+-  retval = g_module_build_path(GCONF_BACKEND_DIR, file);
++  retval = g_module_build_path(backenddir, file);
+ 
+   g_free(back);
+ 
diff --git a/meta/recipes-gnome/gnome/gconf_3.2.3.bb b/meta/recipes-gnome/gnome/gconf_3.2.3.bb
index 3d3e65f..aa9da78 100644
--- a/meta/recipes-gnome/gnome/gconf_3.2.3.bb
+++ b/meta/recipes-gnome/gnome/gconf_3.2.3.bb
@@ -5,10 +5,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
 
 DEPENDS = "glib-2.0 dbus dbus-glib libxml2 intltool-native"
 
+PR = "r1"
+
 inherit gnomebase
 
 SRC_URI = "${GNOME_MIRROR}/GConf/${@gnome_verdir("${PV}")}/GConf-${PV}.tar.bz2;name=archive \
-	   file://nointro.patch"
+	   file://nointro.patch \
+	   file://backenddir.patch"
 
 SRC_URI[archive.md5sum] = "f80329173cd9d134ad07e36002dd2a15"
 SRC_URI[archive.sha256sum] = "52008a82a847527877d9e1e549a351c86cc53cada4733b8a70a1123925d6aff4"





More information about the Openembedded-commits mailing list