[gnome-icon-theme] Update icon cache scriptlets

Christopher Aillon caillon at fedoraproject.org
Sun May 8 02:13:30 UTC 2011


commit 6fb14758968388fb8c6f551f5fd01f53b8ae335e
Author: Christopher Aillon <caillon at redhat.com>
Date:   Sat May 7 19:12:39 2011 -0700

    Update icon cache scriptlets
    
    http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Icon_Cache

 gnome-icon-theme.spec |   31 ++++++++++++++++++++++---------
 1 files changed, 22 insertions(+), 9 deletions(-)
---
diff --git a/gnome-icon-theme.spec b/gnome-icon-theme.spec
index 5dc945e..44c3328 100644
--- a/gnome-icon-theme.spec
+++ b/gnome-icon-theme.spec
@@ -1,7 +1,7 @@
 Summary: GNOME icon theme
 Name: gnome-icon-theme
 Version: 3.0.0
-Release: 1%{?dist}
+Release: 2%{?dist}
 #VCS: git:git://git.gnome.org/gnome-icon-theme
 Source0: http://download.gnome.org/sources/gnome-icon-theme/3.0/%{name}-%{version}.tar.bz2
 Source1: legacy-icon-mapping.xml
@@ -14,8 +14,6 @@ BuildRequires: librsvg2
 BuildRequires: intltool
 Requires: hicolor-icon-theme
 Requires: pkgconfig
-Requires(posttrans): gtk2
-Requires(postun): gtk2
 
 %description
 This package contains the default icon theme used by the GNOME desktop.
@@ -82,17 +80,29 @@ touch files.txt
  find icons/gnome \( -type l -and -not -name *-rtl.png -and -not -name *-ltr.png \) -printf "%%%%{_datadir}/%%p\n"
 ) > legacy.txt
 
-%posttrans
-gtk-update-icon-cache --quiet %{_datadir}/icons/gnome || :
+%post
+touch --no-create %{_datadir}/icons/gnome &>/dev/null || :
 
 %postun
-gtk-update-icon-cache --quiet %{_datadir}/icons/gnome || :
+if [ $1 -eq 0 ] ; then
+    touch --no-create %{_datadir}/icons/gnome &>/dev/null
+    gtk-update-icon-cache %{_datadir}/icons/gnome &>/dev/null || :
+fi
 
-%posttrans legacy
-gtk-update-icon-cache --quiet %{_datadir}/icons/gnome || :
+%posttrans
+gtk-update-icon-cache %{_datadir}/icons/gnome &>/dev/null || :
+
+%post legacy
+touch --no-create %{_datadir}/icons/gnome &>/dev/null || :
 
 %postun legacy
-gtk-update-icon-cache --quiet %{_datadir}/icons/gnome || :
+if [ $1 -eq 0 ] ; then
+    touch --no-create %{_datadir}/icons/gnome &>/dev/null
+    gtk-update-icon-cache %{_datadir}/icons/gnome &>/dev/null || :
+fi
+
+%posttrans legacy
+gtk-update-icon-cache %{_datadir}/icons/gnome &>/dev/null || :
 
 %files -f files.txt
 %defattr(-,root,root)
@@ -104,6 +114,9 @@ gtk-update-icon-cache --quiet %{_datadir}/icons/gnome || :
 %defattr(-,root,root)
 
 %changelog
+* Sat May 07 2011 Christopher Aillon <caillon at redhat.com> - 3.0.0-2
+- Update icon cache scriptlet
+
 * Tue Apr  5 2011 Christopher Aillon <caillon at redhat.com> 3.0.0-1
 - Update to 3.0.0
 


More information about the scm-commits mailing list