[virt-tools-list] Fwd: [virt-viewer] update/optimize mime scriptlets

Cole Robinson crobinso at redhat.com
Sun Sep 28 22:51:38 UTC 2014


FYI this was applied to the Fedora spec, someone should probably turn it into
an upstream virt-viewer patch

- Cole


-------- Forwarded Message --------
commit e96e4bbd184eaae9eed77d8f317108be81023d8a
Author: Rex Dieter <rdieter at math.unl.edu>
Date:   Sat Sep 27 11:19:13 2014 -0500

    update/optimize mime scriptlets

 virt-viewer.spec |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/virt-viewer.spec b/virt-viewer.spec
index 8325271..3049bab 100644
--- a/virt-viewer.spec
+++ b/virt-viewer.spec
@@ -27,7 +27,7 @@

 Name: virt-viewer
 Version: 1.0
-Release: 2%{?dist}%{?extra_release}
+Release: 3%{?dist}%{?extra_release}
 Summary: Virtual Machine Viewer
 Group: Applications/System
 License: GPLv2+
@@ -126,22 +126,23 @@ rm -rf $RPM_BUILD_ROOT

 %post
 /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+/bin/touch --no-create %{_datadir}/mime/packages &> /dev/null || :
 %{_sbindir}/update-alternatives --install %{_libexecdir}/spice-xpi-client \
   spice-xpi-client %{_libexecdir}/spice-xpi-client-remote-viewer 25
-update-desktop-database -q %{_datadir}/applications
-%{_bindir}/update-mime-database %{_datadir}/mime &> /dev/null
+/usr/bin/update-desktop-database -q %{_datadir}/applications

 %postun
 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 || :
+  /usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || :
   %{_sbindir}/update-alternatives --remove spice-xpi-client
%{_libexecdir}/spice-xpi-client-remote-viewer
 fi
-update-desktop-database -q %{_datadir}/applications
-%{_bindir}/update-mime-database %{_datadir}/mime &> /dev/null
+/usr/bin/update-desktop-database -q %{_datadir}/applications

 %posttrans
 /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+/usr/bin/update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || :

 %files -f %{name}.lang
 %defattr(-,root,root,-)
@@ -163,6 +164,9 @@ update-desktop-database -q %{_datadir}/applications
 %{_mandir}/man1/remote-viewer.1*

 %changelog
+* Sat Sep 27 2014 Rex Dieter <rdieter at fedoraproject.org> 1.0-3
+- update/optimize mime scriptlets
+
 * Mon Aug 18 2014 Fedora Release Engineering
<rel-eng at lists.fedoraproject.org> - 1.0-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild






More information about the virt-tools-list mailing list