Patchwork [5/5] gconf.bbclass: run postinstalls at rootfs time

login
register
mail settings
Submitter Laurentiu Palcu
Date Dec. 4, 2012, 1:59 p.m.
Message ID <2a5e0c811c34ab1a7180afc9f25a5051cd393514.1354626535.git.laurentiu.palcu@intel.com>
Download mbox | patch
Permalink /patch/40277/
State Accepted
Commit 50b7f625cc2c4b9224726b11b6d4bd192209cc6e
Headers show

Comments

Laurentiu Palcu - Dec. 4, 2012, 1:59 p.m.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
 meta/classes/gconf.bbclass |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Patch

diff --git a/meta/classes/gconf.bbclass b/meta/classes/gconf.bbclass
index 7a3ee3c..38097bc 100644
--- a/meta/classes/gconf.bbclass
+++ b/meta/classes/gconf.bbclass
@@ -15,13 +15,16 @@  export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL = "1"
 
 gconf_postinst() {
 if [ "x$D" != "x" ]; then
-	exit 1
+	export GCONF_BACKEND_DIR=${STAGING_LIBDIR_NATIVE}/GConf/2
+	export GCONF_CONFIG_SOURCE="xml::$D${sysconfdir}/gconf/gconf.xml.defaults"
+else
+	export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source`
 fi
-SCHEMA_LOCATION=/etc/gconf/schemas
+
+SCHEMA_LOCATION=$D/etc/gconf/schemas
 for SCHEMA in ${SCHEMA_FILES}; do
 	if [ -e $SCHEMA_LOCATION/$SCHEMA ]; then
-		HOME=/root GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` \
-			gconftool-2 \
+		HOME=$D/root gconftool-2 \
 			--makefile-install-rule $SCHEMA_LOCATION/$SCHEMA > /dev/null
 	fi
 done