[transmission] update scriptlets to match current guidelines

Adam Williamson adamwill at fedoraproject.org
Fri May 10 21:17:39 UTC 2013


commit e883518d60e336f8ffcae1476bc32f94337ca7e0
Author: Adam Williamson <awilliam at redhat.com>
Date:   Fri May 10 14:17:30 2013 -0700

    update scriptlets to match current guidelines

 transmission.spec |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)
---
diff --git a/transmission.spec b/transmission.spec
index 7e0c9ff..27a0810 100644
--- a/transmission.spec
+++ b/transmission.spec
@@ -124,13 +124,13 @@ desktop-file-install \
                 
 
 %post common
-touch --no-create %{_datadir}/icons/hicolor || :
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
 %post gtk
-update-desktop-database > /dev/null 2>&1 || :
+/usr/bin/update-desktop-database &> /dev/null || :
 
 %post qt
-update-desktop-database > /dev/null 2>&1 || :
+/usr/bin/update-desktop-database &> /dev/null || :
 
 %post daemon
 %systemd_post transmission-daemon.service
@@ -138,17 +138,23 @@ update-desktop-database > /dev/null 2>&1 || :
 %preun daemon
 %systemd_preun transmission-daemon.service
 
+%postun common
+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
+
 %postun daemon
 %systemd_postun_with_restart transmission-daemon.service 
 
 %postun gtk
-update-desktop-database > /dev/null 2>&1 || :
+/usr/bin/update-desktop-database &> /dev/null || :
 
 %postun qt
-update-desktop-database > /dev/null 2>&1 || :
+/usr/bin/update-desktop-database &> /dev/null || :
 
 %posttrans common
-%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 %files 
 
@@ -187,6 +193,9 @@ update-desktop-database > /dev/null 2>&1 || :
 %doc %{_mandir}/man1/transmission-qt.*
 
 %changelog
+* Fri May 10 2013 Adam Williamson <awilliam at redhat.com>
+- update scriptlets to match current guidelines
+
 * Mon Apr 22 2013 Rahul Sundaram <sundaram at fedoraproject.org> - 2.77-3
 - use hardened build macro and enable fPIC for Qt build. resolves rhbz#955268
 


More information about the scm-commits mailing list