[fedora-release-notes] Update scriptlets per packaging guidelines

Christopher Aillon caillon at fedoraproject.org
Sun May 8 01:30:00 UTC 2011


commit e3a39ac0a929c493d4acf96cde929f793117f70a
Author: Christopher Aillon <caillon at redhat.com>
Date:   Sat May 7 18:29:23 2011 -0700

    Update scriptlets per packaging guidelines
    
    http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Icon_Cache
    http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Scrollkeeper
    http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#desktop-database

 fedora-release-notes.spec |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/fedora-release-notes.spec b/fedora-release-notes.spec
index dbaf12f..36262a2 100644
--- a/fedora-release-notes.spec
+++ b/fedora-release-notes.spec
@@ -2,7 +2,7 @@
 
 Name:      fedora-release-notes
 Version:   14.98.0
-Release:   1%{?dist}
+Release:   2%{?dist}
 Summary:   Release Notes
 URL:       http://fedoraproject.org
 Group:     System Environment/Base
@@ -104,21 +104,18 @@ done
 rm -rf $RPM_BUILD_ROOT
 
 %post
-if [ -x /usr/bin/scrollkeeper-update ]; then scrollkeeper-update -q; fi
-    touch --no-create /usr/share/icons/hicolor
-if [ -x /usr/bin/gtk-update-icon-cache ]; then
-    gtk-update-icon-cache -q /usr/share/icons/hicolor &> /dev/null || :
-fi
-if [ -x /usr/bin/update-desktop-database ]; then update-desktop-database &> /dev/null; fi
+touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+update-desktop-database &> /dev/null || :
 
 %postun
-if [ -x /usr/bin/scrollkeeper-update ]; then scrollkeeper-update -q; fi
-    touch --no-create /usr/share/icons/hicolor
-if [ -x /usr/bin/gtk-update-icon-cache ]; then
-    gtk-update-icon-cache -q /usr/share/icons/hicolor &> /dev/null || :
+if [ $1 -eq 0 ] ; then
+    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 fi
-if [ -x /usr/bin/scrollkeeper-update ]; then scrollkeeper-update -q; fi
-if [ -x /usr/bin/update-desktop-database ]; then update-desktop-database &> /dev/null; fi
+update-desktop-database &> /dev/null || :
+
+%posttrans
+gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 %files
 %defattr(-,root,root,-)
@@ -141,6 +138,9 @@ if [ -x /usr/bin/update-desktop-database ]; then update-desktop-database &> /dev
 %{_datadir}/icons/hicolor/scalable/apps/fedora-documentation.svg
 
 %changelog
+* Sat May 07 2011 Christopher Aillon <caillon at redhat.com> - 14.98.0-2
+- Update icon cache and desktop database scriptlets
+
 * Fri Apr  7 2011 John J. McDonough <jjmcd at fedoraproject.org> - 14.98.0-1
 - Remove dom0, dnssec, riak dropped from features
 - Add description of IcedTea


More information about the scm-commits mailing list