[java-1.7.0-openjdk] update scriptlets to follow current guidelines for updating icon cache

Adam Williamson adamwill at fedoraproject.org
Fri May 10 21:38:15 UTC 2013


commit f9759dc407ad1fa5ec90a7539c23864cf01f16b1
Author: Adam Williamson <awilliam at redhat.com>
Date:   Fri May 10 14:38:07 2013 -0700

    update scriptlets to follow current guidelines for updating icon cache

 java-1.7.0-openjdk.spec |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/java-1.7.0-openjdk.spec b/java-1.7.0-openjdk.spec
index 8657f02..54aee4c 100644
--- a/java-1.7.0-openjdk.spec
+++ b/java-1.7.0-openjdk.spec
@@ -888,10 +888,7 @@ alternatives \
 
 update-desktop-database %{_datadir}/applications &> /dev/null || :
 
-touch --no-create %{_datadir}/icons/hicolor
-if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
-  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
-fi
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
 exit 0
 
@@ -905,13 +902,16 @@ fi
 
 update-desktop-database %{_datadir}/applications &> /dev/null || :
 
-touch --no-create %{_datadir}/icons/hicolor
-if [ -x %{_bindir}/gtk-update-icon-cache ] ; then
-  %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor
+if [ $1 -eq 0 ] ; then
+    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 fi
 
 exit 0
 
+%posttrans
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+
 %post devel
 ext=.gz
 alternatives \
@@ -1154,6 +1154,9 @@ exit 0
 %{_jvmdir}/%{jredir}/lib/accessibility.properties
 
 %changelog
+* Fri May 10 2013 Adam Williamson <awilliam at redhat.com>
+- update scriptlets to follow current guidelines for updating icon cache
+
 * Tue May 07 2013 Jiri Vanek <jvanek at redhat.com> - 1.7.0.19-2.3.9.8.fc20
 - added patch 401 657854-openjdk7.patch (see 947731)
 - fixed icons (see https://bugzilla.redhat.com/show_bug.cgi?id=820619)


More information about the scm-commits mailing list