gconf schema registration delay - grrrr!

Soren Hansen soren at ubuntu.com
Fri Jul 20 11:12:15 BST 2007


This is not actually a desktop related issue, but this seems like the
most sensible place to discuss gconf related issues.

I have a package that uses gconf.  In its postinst script it registers
the schemas (using gconf-schemas (inserted by dh_gconf)). Immediately
afterwards it pokes a daemon that expects to find some values from the
just registered schema.  The trouble is that gconf-schemas send all
running gconfd-2 processes a SIGHUP, but gconfd-2 just registeres that
it received a SIGHUP and doesn't do anything about it until its next
periodic_cleanup() run which could be as much as 30 seconds later. This
means that in almost every case, the daemon fails to find the values
from the schema and the installation fails.

I can think of three workarounds: 
1) Patch gconfd to handle the SIGHUP when it receives it rather than at
next periodic_cleanup() run.

2) Actually kill the gconfd-2 of the relevant user (not just SIGHUP)

3) Sleep for 30 seconds in my postinst.

Neither seem very nice. 

1) Feels too intrusive. 2) seems a bit harsh, and 3) is just plain dumb.

I can't imagine I'm the first one to have to tackle this. Suggestions?

Please CC me on replies as I'm not subscribed to the ubuntu-desktop ml.

Soren Hansen
Ubuntu Server Team
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/ubuntu-desktop/attachments/20070720/64f5a4fd/attachment.pgp 

More information about the ubuntu-desktop mailing list