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

Re: Deciding what gconf defaults to install at postinst



Le mercredi 23 août 2006 à 10:35 +0200, Josselin Mouette a écrit :
> Le mardi 22 août 2006 à 23:53 -0300, Gustavo Noronha Silva a écrit :
> > Hello,
> > 
> > I may need to provide a default gconf setting for my package based on a
> > debconf setting. Any suggestions on how to do such a thing? Is anyone
> > doing it?
> > 
> > The specific usage would be for gksu to determine whether it should use
> > su or sudo as default backend. Would an alternative (for
> > update-alternatives) for the schema file do fine, or that seems broken?
> 
> I think you shouldn't use debconf for that. The default should be to use
> the sudo backend if sudo is installed, su otherwise. In all cases that
> can be done with an alternative or a diversion on the *defaults* file.
> You should not modify the schema file anyway, only use a defaults file
> in /use/share/gconf/defaults.

On second thought there is a much simpler option than alternatives or
diversions. Ship a debian/gconf-defaults file in the gksu source,
containing the following:
	/apps/gksu/sudo-mode    false
(Or don't ship anything, if this is the default.)

Then, ship a debian/gconf-defaults file in the sudo source, with the
following:
	/apps/gksu/sudo-mode    true
and call in the rules file:
	dh_gconf --priority 15

This way, the default from the sudo package will override that of the
gksu package. If gksu isn't installed, it doesn't break anything.
(Of course sudo shouldn't depend on ${misc:Depends} in this case, so
that it doesn't bring gconf2 automatically.)
-- 
 .''`.           Josselin Mouette        /\./\
: :' :           josselin.mouette@ens-lyon.org
`. `'                        joss@debian.org
   `-  Debian GNU/Linux -- The power of freedom



Reply to: