From 6eb52d6cf8e88d3f2d5c49585675f1539bd29051 Mon Sep 17 00:00:00 2001 From: Martin Sehnoutka Date: Fri, 19 May 2017 13:59:55 +0200 Subject: [PATCH] Add triggerin script to remove old alternatives --- wireshark.spec | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/wireshark.spec b/wireshark.spec index 6e4bed0..06b8cbb 100644 --- a/wireshark.spec +++ b/wireshark.spec @@ -5,7 +5,7 @@ Summary: Network traffic analyzer Name: wireshark Version: 2.2.6 -Release: 3%{?dist} +Release: 4%{?dist} License: GPL+ Group: Applications/Internet Url: http://www.wireshark.org/ @@ -280,7 +280,7 @@ touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : touch --no-create %{_datadir}/mime/packages &> /dev/null || : gtk-update-icon-cache -t %{_datadir}/icons/hicolor &>/dev/null || : /usr/sbin/update-alternatives --install %{_bindir}/wireshark \ - %{name}-gui %{_bindir}/wireshark-gtk 10 + %{name} %{_bindir}/wireshark-gtk 10 %post qt update-desktop-database &> /dev/null ||: @@ -288,7 +288,12 @@ touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : touch --no-create %{_datadir}/mime/packages &> /dev/null || : update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : /usr/sbin/update-alternatives --install %{_bindir}/wireshark \ - %{name}-gui %{_bindir}/wireshark-qt 50 + %{name} %{_bindir}/wireshark-qt 50 + +%triggerin -- wireshark < 2.2.6-4 +/usr/sbin/update-alternatives --remove-all %{name} &> /dev/null || : +# This one was used as a workaround during f26 devel phase +/usr/sbin/update-alternatives --remove-all %{name}-gui &> /dev/null || : %postun cli -p /sbin/ldconfig @@ -304,13 +309,13 @@ if [ $1 -eq 0 ] ; then touch --no-create %{_datadir}/mime/packages &> /dev/null || : update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : - /usr/sbin/update-alternatives --remove %{name}-gui %{_bindir}/wireshark-gtk + /usr/sbin/update-alternatives --remove %{name} %{_bindir}/wireshark-gtk fi %postun qt update-desktop-database &> /dev/null || : if [ $1 -eq 0 ] ; then - /usr/sbin/update-alternatives --remove %{name}-gui %{_bindir}/wireshark-qt + /usr/sbin/update-alternatives --remove %{name} %{_bindir}/wireshark-qt fi %posttrans cli