[Fedora-packaging] Packaging-related changes in GNOME

Matthias Clasen mclasen at redhat.com
Thu May 27 14:17:10 UTC 2010


This cycle, some things land in GNOME land that will require minor
adjustments of scriptlets:

1) GIO modules. GIO now uses a caching approach to its modules. If a
package installs a loadable module in %{_libdir}/gio/modules, you need
to run gio-querymodules to update
%{_libdir}/gio/modules/giomodule.cache. There's the usual multilib pain;
glib2 installs the binary as gio-querymodules-32/64. I propose to
recommend the following scriptlets for this:

%posttrans
gio-querymodules-%{__isa_bits} || :

%postun
gio-querymodules-%{__isa_bits} || :


2) GSettings. GConf is on the way out, we will start seeing applications
that are ported to GSettings (which is part of libgio in the glib2
package). GSettings uses schemas as well, and has a cache of those that
needs updating if schemas are added/removed. The tool for this is
glib-compile-schemas (schemas and their cache are arch-neutral, so no
multilib pain here). Proposed scriptlets:

%posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas || :

%postun
glib-compile-schemas %{_datadir}/glib-2.0/schemas || :


3) GTK3. gtk3 will be parallel installable with gtk2, which means it
keeps its loadable modules separate. I took the occasion to rework
things a bit to reduce the multilib pain. gdk-pixbuf loaders, theme
engines and im modules get installed to
%{_libdir}/gtk-3.0/3.0.0/{loaders,engines,immodules}, and the cache
files for loaders and immodules have been relocated to
%{_libdir}/gtk-3.0/3.0.0/{loaders,immodules}.cache. Suitable scriptlets
to update these caches look as follows:

%posttrans
gdk-pixbuf-query-loaders-3.0-%{__isa_bits} --update-cache || :
gtk-query-immodules-3.0-%{__isa_bits} --update-cache || :

%postun
gdk-pixbuf-query-loaders-3.0-%{__isa_bits} --update-cache || :
gtk-query-immodules-3.0-%{__isa_bits} --update-cache || :


I guess all the %postun scriptlets could be optimized with a if $1 -eq 0


Comments ?

Matthias



More information about the packaging mailing list