Hi Dave, On Tue, 2005-03-01 at 14:42 -0500, David Malcolm wrote: > How should we be dealing with GConf schema in spec files? > > Looking over some existing spec files, I see things like this: > SCHEMAS="clock.schemas fish.schemas pager.schemas panel-compatibility.schemas panel-general.schemas panel-global.schemas panel-object.schemas panel-toplevel.schemas tasklist.schemas window-list.schemas workspace-switcher.schemas" > for S in $SCHEMAS; do > gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/$S > /dev/null > done > > (from the gnome-panel spec file's "inst" section) > > Why is this done here? This is in %post and needs to be there since you don't want to package the %gconf.xml files that --makefile-install creates in /etc/gconf/gconf.xml.defaults - those files are the aggregate of what (possibly multiple) packages install. So, in %post, you've no way (that I know of) to know which .schemas installed belong to this package - hence the hardcoded list of .schemas files. > Can we have an RPM macro instead? Dunno, the only thing that doesn't look like its generic is the list of .schemas files. > Some spec files try to uninstall the schema e.g. from > evolution-connector: > %preun > export GCONF_CONFIG_SOURCE=`gconftool-2 --get-default-source` > gconftool-2 --makefile-uninstall-rule \ > %{_sysconfdir}/gconf/schemas/apps_evolution_exchange.schemas >/dev/null || : > > Is this recommended best-practise? Yeah, all packages should do this and we should probably also be doing killall -HUP gconfd-2 or something so the daemons see the new schemas. Cheers, Mark.