only run %pre on upgrades

This commit is contained in:
Rex Dieter 2015-01-18 07:05:27 -06:00
parent a14f58dfd1
commit a9071e838a
1 changed files with 2 additions and 0 deletions

View File

@ -933,6 +933,7 @@ rm -rf %{buildroot}
%if 0%{?qtchooser}
%pre
if [ $1 -gt 1 ] ; then
# remove short-lived qt4.conf alternatives
%{_sbindir}/update-alternatives \
--remove qtchooser-qt4 \
@ -941,6 +942,7 @@ rm -rf %{buildroot}
%{_sbindir}/update-alternatives \
--remove qtchooser-default \
%{_sysconfdir}/xdg/qtchooser/qt4.conf >& /dev/null ||:
fi
%endif
%post