aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/rpm
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2014-08-01 14:51:53 -0400
committerJeff Morriss <jeff.morriss.ws@gmail.com>2014-08-01 18:54:24 +0000
commitc93297c750b99ac487f1f787896959ca43f64c72 (patch)
tree474a8eff8285166c117373374c4d6e74390eb14e /packaging/rpm
parentfb526204f81c2cac8499cc5c9db569750186ad34 (diff)
Remove the old wireshark binary during RPM upgrades.
If we have a pre-alternatives wireshark binary out there (e.g., because we're upgrading from wireshark-1.10 to wireshark-1.12), get rid of it in the %pre script. Otherwise the binary gets left there (because it's listed as a %ghost in the new spec file). Change-Id: I5828fcff486af3d269bad8dfe544c7659179bf5e Reviewed-on: https://code.wireshark.org/review/3332 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Diffstat (limited to 'packaging/rpm')
-rw-r--r--packaging/rpm/SPECS/wireshark.spec.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/packaging/rpm/SPECS/wireshark.spec.in b/packaging/rpm/SPECS/wireshark.spec.in
index ad180e290f..d9cba1e5f2 100644
--- a/packaging/rpm/SPECS/wireshark.spec.in
+++ b/packaging/rpm/SPECS/wireshark.spec.in
@@ -246,10 +246,16 @@ desktop-file-validate %{buildroot}/usr/share/applications/wireshark.desktop
%clean
rm -rf $RPM_BUILD_ROOT
-%if %{use_wireshark_group}
%pre
+%if %{use_wireshark_group}
getent group wireshark >/dev/null || groupadd -r wireshark
%endif
+# If we have a pre-alternatives wireshark binary out there, get rid of it.
+# (With 'alternatives' %{_bindir}/wireshark should be a symlink.)
+if [ -f %{_bindir}/wireshark ]
+then
+ rm -f %{_bindir}/wireshark
+fi
%post -p /sbin/ldconfig