Re: gconf-login-check



jacob berkman <jacob ximian com> writes:
> 
> if we had a login check for gconf sanity, what would it check for?
>     
> would you like to write it?  :)
>

I already did - gconf-sanity-check-2 - just add it to gnome-session.
It displays a dialog, then returns nonzero if gconf is horked.
I think it catches all the common kinds of screwup.

> also, how should apps be dealing with catastrophic gconf failures?  ie,
> if .schemas aren't installed right, what do we recommend the user do?

Well essentially schemas-not-installed should never happen. I don't
see how it will happen with working RPMs unless people run rm -r on
the GConf database. People are just seeing issues due to bugs in
glib/linc/gconf/whatever, or installing gconf 1/2 to different
prefixes so that they look in different places for the data.

Long-term what we might do is have apps call:

 gconf_add_schema_file (PREFIX"/gconf/schemas/myapp.schemas");

which would parse the schema file on the client side and use that for
emergency fallbacks. We can add this if we rethink the gconf API 
considering eel-preferences and other attempts at convenience wrappers
that people have written.

Short-term I think the thing to do is initialize your prefs variables
to something that's at least semi-sane, and then whenever you get
bogus gconf values, ignore them (keep current prefs).

In general apps should be robust against any junk that's in the
database, so losing schemas should not be catastrophic, worst-case it
should result in kind of weird preferences. Of course apps should not
have preferences that break the app when set to valid values. ;-)

But anyway, I've never really had a "lost schemas" problem that wasn't
a bug in something.

Havoc








[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]