Changelog
0.1: first go at this
Existing Guideline
GConf Schema registration
Currently, when a package requires an XML schema it is installed in %{_sysconfdir}/gconf/schemas/
(such as
gcalctool
in the following example), gconftool-2
should be run after the package is installed/uninstalled in FC4 or later. If the package is upgraded, the existing schema is deleted and removed from the XML schema tree (registry). This is required so that the program(s) have a default configuration and for any custom options a user may wish to edit with using gconf-editor
.
Note that this is required for any package that has a schema that must register its configurations into the registry.
%post
scrollkeeper-update -q
export GCONF_CONFIG_SOURCE=
gconftool-2 --get-default-source
gconftool-2 --makefile-install-rule %{_sysconfdir}/gconf/schemas/gcalctool.schemas > /dev/null || :
%pre
if [ "$1" -gt 1 ]; then
export GCONF_CONFIG_SOURCE=gconftool-2 --get-default-source
gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/gcalctool.schemas > /dev/null || :
fi
%preun
if [ "$1" -eq 0 ]; then
export GCONF_CONFIG_SOURCE=gconftool-2 --get-default-source
gconftool-2 --makefile-uninstall-rule %{_sysconfdir}/gconf/schemas/gcalctool.schemas > /dev/null || :
fi
Proposal
Motivations for changing the existing guideline:
- include footnote/reference to fdo icon-theme-spec.
- simplify guideline by removing toolkit-specific optimization details.
- gtk-update-icon-cache currently runs on every pkg install (that includes icons), which is potentially very inefficient. (see %posttrans). Informal benchmarks show 0.2-0.5 (user) seconds for every invocation. This appears to have been addressed in a recent update to guic to include a --delay option.
icon cache
If an application installs icons into one of the subdirectories in %{_datadir}/icons/
(such as hicolor
in the following examples), care must be taken to ensure the installed icons appear properly after package installation[[FootNote([1] ) .
Use the following scriptlets:
%post
%{_bindir}/xdg-icon-resource forceupdate --theme hicolor 2> /dev/null || :
%postun
%{_bindir}/xdg-icon-resource forceupdate --theme hicolor 2> /dev/null || :
gtk icon cache coherency brainstorm (not part of packaging guidelines)
Brainstorming methods to keep gtk icon cache fresh. See also bugzilla bug tracking this:
[2] gtk2: create/maintain iconcache
Ideas include:
- cron job (like prelink)
- on boot (init) + file-system monitoring daemon (e.g. incron)
- rpm %posttrans scriptlet hook. No, %posttransun doesn't work (rpm bug?)