From 97501a9135defb5e92ff64d815717f34ae4c9387 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Fri, 9 Nov 2012 21:42:04 +0100 Subject: [PATCH] Move some of the rpm scriptlets back to %posttrans This partially reverts commit 38d8a9c2. glib-compile-schemas and gtk-update-icon-cache are deliberately split up between %post and %posttrans to optimize the scriptlet run time with multi-package transactions. Instead of regenerating the whole icon cache after every single package install (in %post), this splits it in two: in %post, there's just a "touch %{_datadir}/icons/hicolor", and the icon cache is later regenerated once after the whole transaction (in %posttrans). The very first gtk-update-icon-cache call in %posttrans regenerates the cache, and the subsequent ones are no-op because the icon files (and directory timestamps) don't change during the sequential %posttrans runs. http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Icon_Cache --- dconf.spec | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dconf.spec b/dconf.spec index 61a0fc1..9bb19b3 100644 --- a/dconf.spec +++ b/dconf.spec @@ -3,7 +3,7 @@ Name: dconf Version: 0.15.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A configuration system Group: System Environment/Base @@ -61,19 +61,20 @@ make install DESTDIR=$RPM_BUILD_ROOT %post /sbin/ldconfig gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules -glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : touch --no-create %{_datadir}/icons/hicolor >&/dev/null || : -gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %postun +/sbin/ldconfig if [ $1 -eq 0 ] ; then - /sbin/ldconfig gio-querymodules-%{__isa_bits} %{_libdir}/gio/modules glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : touch --no-create %{_datadir}/icons/hicolor >&/dev/null || : gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : fi +%posttrans +glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : +gtk-update-icon-cache %{_datadir}/icons/hicolor >&/dev/null || : %files -f dconf.lang %doc COPYING @@ -109,6 +110,10 @@ fi %{_mandir}/man1/dconf-editor.1.gz %changelog +* Fri Nov 09 2012 Kalev Lember - 0.15.0-3 +- Move some of the rpm scriptlets back to %%posttrans + (glib-compile-schemas, icon cache) + * Thu Nov 8 2012 Marek Kasik - 0.15.0-2 - Move dconf-editor's man page to the dconf-editor sub-package