r23660 - in /desktop/unstable/gconf/debian: changelog gconf-schemas gconf2-common.dirs gconf2.postinst gconf2.triggers update-gconf-defaults
joss at users.alioth.debian.org
joss at users.alioth.debian.org
Fri Apr 9 17:51:21 UTC 2010
Author: joss
Date: Fri Apr 9 17:51:21 2010
New Revision: 23660
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=23660
Log:
* So, it seems that parsing XML is so slow that regenerating the
database entirely is faster than unregistering a schema and
registering it again. Which means moving to triggers is a big
performance improvement.
* update-gconf-defaults, gconf-schemas: do nothing when called from
dpkg, except from gconf2.postinst itself.
* gconf2.triggers: register the /usr/share/gconf/* directories.
* gconf2.postinst: regenerate the databases depending on the triggers
called.
* gconf2-common.dirs: ship an empty /usr/share/gconf/schemas, just in
case.
Added:
desktop/unstable/gconf/debian/gconf2.triggers
Modified:
desktop/unstable/gconf/debian/changelog
desktop/unstable/gconf/debian/gconf-schemas
desktop/unstable/gconf/debian/gconf2-common.dirs
desktop/unstable/gconf/debian/gconf2.postinst
desktop/unstable/gconf/debian/update-gconf-defaults
Modified: desktop/unstable/gconf/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gconf/debian/changelog?rev=23660&op=diff
==============================================================================
--- desktop/unstable/gconf/debian/changelog [utf-8] (original)
+++ desktop/unstable/gconf/debian/changelog [utf-8] Fri Apr 9 17:51:21 2010
@@ -1,3 +1,19 @@
+gconf (2.28.1-2) unstable; urgency=low
+
+ * So, it seems that parsing XML is so slow that regenerating the
+ database entirely is faster than unregistering a schema and
+ registering it again. Which means moving to triggers is a big
+ performance improvement.
+ * update-gconf-defaults, gconf-schemas: do nothing when called from
+ dpkg, except from gconf2.postinst itself.
+ * gconf2.triggers: register the /usr/share/gconf/* directories.
+ * gconf2.postinst: regenerate the databases depending on the triggers
+ called.
+ * gconf2-common.dirs: ship an empty /usr/share/gconf/schemas, just in
+ case.
+
+ -- Josselin Mouette <joss at debian.org> Fri, 09 Apr 2010 19:35:08 +0200
+
gconf (2.28.1-1) unstable; urgency=low
[ David Weinehall ]
Modified: desktop/unstable/gconf/debian/gconf-schemas
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gconf/debian/gconf-schemas?rev=23660&op=diff
==============================================================================
--- desktop/unstable/gconf/debian/gconf-schemas [utf-8] (original)
+++ desktop/unstable/gconf/debian/gconf-schemas [utf-8] Fri Apr 9 17:51:21 2010
@@ -24,6 +24,11 @@
if options.register==None and not options.register_all:
parser.error("You need to specify --register or --unregister.")
+
+if 'DPKG_RUNNING_VERSION' in os.environ and not options.register_all:
+ # This is what happens when we are called in an obsolete postinst/prerm script
+ # Do nothing, it will be done in the trigger
+ sys.exit(0)
schema_location="/usr/share/gconf/schemas"
defaults_dest="/var/lib/gconf/defaults"
Modified: desktop/unstable/gconf/debian/gconf2-common.dirs
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gconf/debian/gconf2-common.dirs?rev=23660&op=diff
==============================================================================
--- desktop/unstable/gconf/debian/gconf2-common.dirs [utf-8] (original)
+++ desktop/unstable/gconf/debian/gconf2-common.dirs [utf-8] Fri Apr 9 17:51:21 2010
@@ -3,6 +3,7 @@
/etc/gconf/gconf.xml.defaults
/usr/share/gconf/defaults
/usr/share/gconf/mandatory
+/usr/share/gconf/schemas
/var/lib/gconf/defaults
/var/lib/gconf/debian.defaults
/var/lib/gconf/debian.mandatory
Modified: desktop/unstable/gconf/debian/gconf2.postinst
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gconf/debian/gconf2.postinst?rev=23660&op=diff
==============================================================================
--- desktop/unstable/gconf/debian/gconf2.postinst [utf-8] (original)
+++ desktop/unstable/gconf/debian/gconf2.postinst [utf-8] Fri Apr 9 17:51:21 2010
@@ -2,20 +2,40 @@
set -e
-install_alternative() {
+signal_daemons()
+{
+ # Tell all running daemons to reload their databases
+ kill -s HUP `pidof gconfd-2` >/dev/null 2>&1 || true
+}
+
+if [ "$1" = triggered ]; then
+ for trigger in $2; do
+ case $trigger in
+ /usr/share/gconf/schemas)
+ gconf-schemas --register-all --no-signal
+ ;;
+ /usr/share/gconf/defaults)
+ update-gconf-defaults --no-signal
+ ;;
+ /usr/share/gconf/mandatory)
+ update-gconf-defaults --no-signal --mandatory
+ ;;
+ esac
+ done
+ signal_daemons
+ exit 0
+fi
+
+if [ "$1" = configure ] && dpkg --compare-versions "$2" lt 2.26.2-4; then
update-alternatives \
--install /usr/bin/gconftool gconftool /usr/bin/gconftool-2 25 \
--slave /usr/share/man/man1/gconftool.1.gz gconftool.1.gz \
/usr/share/man/man1/gconftool-2.1.gz
-}
-
-if [ "$1" = configure ] && dpkg --compare-versions "$2" lt 2.26.2-4; then
- install_alternative
fi
#DEBHELPER#
-for GCONF_DIR in /var/lib/gconf/defaults \
+for GCONF_DIR in \
/etc/gconf/gconf.xml.mandatory \
/etc/gconf/gconf.xml.defaults ; do
GCONF_TREE=$GCONF_DIR/%gconf-tree.xml
@@ -24,30 +44,13 @@
chmod 644 "$GCONF_TREE"
find "$GCONF_DIR" -mindepth 1 -maxdepth 1 -type d -exec rm -rf \{\} \;
rm -f "$GCONF_DIR/%gconf.xml"
- SIGNAL_DAEMONS=yes
fi
done
-if [ -d /usr/share/gconf/schemas ]; then
- if [ "$1" = configure ] && [ -z "$2" ] || [ ! -s /var/lib/gconf/defaults/%gconf-tree.xml ]; then
- # First installation: rebuild the defaults database in case
- # of packages shipping schemas but not depending on gconf2
- gconf-schemas --register-all --no-signal
- SIGNAL_DAEMONS=yes
- fi
-fi
-if [ -d /usr/share/gconf/defaults ] && [ ! -s /var/lib/gconf/debian.defaults/%gconf-tree.xml ]; then
- # Same for the defaults
- update-gconf-defaults --no-signal
- SIGNAL_DAEMONS=yes
-fi
-if [ -d /usr/share/gconf/mandatory ] && [ ! -s /var/lib/gconf/debian.mandatory/%gconf-tree.xml ]; then
- # Same for the mandatory settings
- update-gconf-defaults --no-signal --mandatory
- SIGNAL_DAEMONS=yes
-fi
+# Upon installation/upgrade, regenerate all databases, because in this case
+# there will be no trigger run
+gconf-schemas --register-all --no-signal
+update-gconf-defaults --no-signal
+update-gconf-defaults --no-signal --mandatory
+signal_daemons
-if [ "$SIGNAL_DAEMONS" = yes ]; then
- # re-read gconf databases
- kill -s HUP `pidof gconfd-2` >/dev/null 2>&1 || true
-fi
Added: desktop/unstable/gconf/debian/gconf2.triggers
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gconf/debian/gconf2.triggers?rev=23660&op=file
==============================================================================
--- desktop/unstable/gconf/debian/gconf2.triggers (added)
+++ desktop/unstable/gconf/debian/gconf2.triggers [utf-8] Fri Apr 9 17:51:21 2010
@@ -1,0 +1,3 @@
+interest /usr/share/gconf/defaults
+interest /usr/share/gconf/mandatory
+interest /usr/share/gconf/schemas
Modified: desktop/unstable/gconf/debian/update-gconf-defaults
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gconf/debian/update-gconf-defaults?rev=23660&op=diff
==============================================================================
--- desktop/unstable/gconf/debian/update-gconf-defaults [utf-8] (original)
+++ desktop/unstable/gconf/debian/update-gconf-defaults [utf-8] Fri Apr 9 17:51:21 2010
@@ -22,6 +22,11 @@
help="only regenerate configuration if needed")
(options, args) = parser.parse_args()
+
+if 'DPKG_RUNNING_VERSION' in os.environ and options.signal:
+ # This is what happens when we are called in an obsolete postinst/prerm script
+ # Do nothing, it will be done in the trigger
+ sys.exit(0)
if options.mandatory:
options.source_dir="/usr/share/gconf/mandatory"
More information about the pkg-gnome-commits
mailing list