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

Re: gconf and defaults



Le jeudi 22 septembre 2005 à 10:03 +0200, Josselin Mouette a écrit :
> To make this support easier, I intend to modify dh_gconf again so that
> it writes default %gconf.xml files in these directories. For example,
> debian/package.gconf would contain:
>         /apps/dpl/tentacles 9
>         /apps/dpl/tentacle_size 12.7
>         /apps/dpl/victim "cute blondie"
>         /apps/dpl/with_blood true
> and it would generate an appropriate
> debian/package/usr/share/gconf/debian.defaults/apps/dpl/%gconf.xml file.
> Command-line options could be used to create the file in the
> cdd.defaults (for CDD defaults), local.defaults (for local customisation
> packages) or local.mandatory directories.

The discussion took place on IRC, and while people seem to agree with
the semantics of the debian/package.gconf file, there were objections to
the implementation. It seems there was a total misunderstanding of what
CDD distributions do and how they do it. As explained in my previous
mail, everyone is going the wrong way, so let's start over.

It seems the current way of doing things is to generate the %gconf.xml
files by a call to gconftool-2 in the postinst, setting the default
source to somewhere in /usr. First of all and most importantly, these
files must move to /var. In the end, only schemas will remain in /usr.
Then, 2 solutions have been proposed so far to handle the package.gconf
files:
     1. Generate a postinst/prerm containing gconftool-2 calls for each
        of the keys listed in debian/package.gconf, setting the default
        source to /var/lib/gconf/debian.defaults.
     2. Install the package.gconf file in /usr/share/gconf/defaults and
        add a call to update-gconf-defaults in the postinst/postrm. This
        script would be in charge to regenerate
        a /var/lib/gconf/debian.defaults/%gconf-tree.xml file,
        containing *all* defaults for Debian packages. Ditto for the
        cdd.defaults and local.defaults trees.
Option 2 means generating the file by a script and not by a call to
gconftool. However it is more robust, puts less burden on debhelper, and
will detect clashes between packages.
-- 
 .''`.           Josselin Mouette        /\./\
: :' :           josselin.mouette@ens-lyon.org
`. `'                        joss@debian.org
   `-  Debian GNU/Linux -- The power of freedom



Reply to: