[maemo-commits] [maemo-commits] r12488 - projects/haf/trunk/gconf2/debian

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Jun 26 17:23:31 EEST 2007
Author: richard
Date: 2007-06-26 17:23:19 +0300 (Tue, 26 Jun 2007)
New Revision: 12488

Added:
   projects/haf/trunk/gconf2/debian/gconf-schemas
Modified:
   projects/haf/trunk/gconf2/debian/changelog
   projects/haf/trunk/gconf2/debian/gconf2.install
Log:
Add gconf-schemas script

Modified: projects/haf/trunk/gconf2/debian/changelog
===================================================================
--- projects/haf/trunk/gconf2/debian/changelog	2007-06-26 14:08:03 UTC (rev 12487)
+++ projects/haf/trunk/gconf2/debian/changelog	2007-06-26 14:23:19 UTC (rev 12488)
@@ -1,3 +1,9 @@
+gconf2 (2.16.0~unreleased) unstable; urgency=low
+
+  * Partly fixes NB#56587, dh_gconf does not generate .postinst scripts
+
+ -- Richard Hult <richard at imendio.com>  Tue, 26 Jun 2007 16:13:53 +0200
+
 gconf2 (2.16.0-1osso5) unstable; urgency=low
 
   * Handle setting empty pairs

Added: projects/haf/trunk/gconf2/debian/gconf-schemas
===================================================================
--- projects/haf/trunk/gconf2/debian/gconf-schemas	2007-06-26 14:08:03 UTC (rev 12487)
+++ projects/haf/trunk/gconf2/debian/gconf-schemas	2007-06-26 14:23:19 UTC (rev 12488)
@@ -0,0 +1,77 @@
+#!/bin/sh
+#
+# Copyright (C) 2007 Nokia Corporation. All rights reserved. 
+#
+# Licensed under the GNU Lesser General Public License, version 2.1
+# See COPYING for details
+
+args=$*
+
+usage() {
+    cat <<EOF
+usage: $0 --[un]register schemas.file1 [schemas.file2 [...]]
+EOF
+}
+
+if [ -z "$args" ]; then
+    usage
+    exit 1
+fi
+
+if [ $1 != "--register" ] && [ $1 != "--unregister" ]; then
+    usage
+    exit 1
+fi
+
+# check that at least one schemas file is given
+if [ $# -lt 2 ]; then
+    usage
+    exit 1
+fi
+
+if [ `id -u` -ne 0 ]; then
+    echo "You must be root to launch this program."
+    exit 1
+fi
+
+action=$1
+
+# take out the action from the arguments
+shift
+
+# Go through the given schema files and construct a path with the
+# schema location.
+# TODO: isabs($SCHEMA)
+schema_location="/usr/share/gconf/schemas"
+schema_files=$*
+
+for SCHEMA in $schema_files; do
+    if [ -e $schema_location/$SCHEMA ]; then
+	schemas="$schemas $schema_location/$SCHEMA"
+    else
+	echo "Warning: $schema_location/$SCHEMA could not be found."
+    fi
+done
+
+# create a temp directory and try to ensure that the directory does
+# not already exist
+tmp_home="/tmp/gconf2-regunreg-$$"
+until [ ! -d $tmp_home ]; do
+    tmp_home="$tmp_home"_x
+done
+
+mkdir -p $tmp_home
+
+if [ $action = "--register" ]; then
+    HOME=$tmp_home GCONF_CONFIG_SOURCE="xml:readwrite:/var/lib/gconf/defaults"\
+	gconftool-2 --makefile-install-rule $schemas
+#    kill -s HUP `pidof gconfd-2` >/dev/null 2>&1 || true
+fi
+
+if [ $action = "--unregister" ]; then
+    HOME=$tmp_home GCONF_CONFIG_SOURCE="xml:readwrite:/var/lib/gconf/defaults"\
+	gconftool-2 --makefile-uninstall-rule $schemas
+fi
+
+# remove the temp directory
+rm -rf $tmp_home

Modified: projects/haf/trunk/gconf2/debian/gconf2.install
===================================================================
--- projects/haf/trunk/gconf2/debian/gconf2.install	2007-06-26 14:08:03 UTC (rev 12487)
+++ projects/haf/trunk/gconf2/debian/gconf2.install	2007-06-26 14:23:19 UTC (rev 12488)
@@ -6,3 +6,5 @@
 debian/tmp/etc/dbus-1/system.d/gconfd.conf
 debian/tmp/etc/gconf/2/path
 debian/gconf-daemon.sh /etc/osso-af-init
+debian/gconf-schemas usr/sbin
+


More information about the maemo-commits mailing list