fix %pre scriptlet

This commit is contained in:
Nikola Forró 2020-03-01 23:14:55 +01:00
parent 902d5866bb
commit ac2b9872d5

View File

@ -4,7 +4,7 @@
Summary: Tools for searching and reading man pages
Name: man-db
Version: 2.9.1
Release: 5%{?dist}
Release: 6%{?dist}
# GPLv2+ .. man-db
# GPLv3+ .. gnulib
License: GPLv2+ and GPLv3+
@ -118,8 +118,8 @@ install -D -p -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_unitdir}/man-db-restart-cache
%pre
# remove alternativized files if they are not symlinks
for f in man apropos whatis; do
[ -L %{_bindir}/$f ] || rm -f %{_bindir}/$f
[ -L %{_mandir}/man1/$f.1.gz ] || rm -f %{_mandir}/man1/$f.1.gz
[ -L %{_bindir}/$f ] || %{__rm} -f %{_bindir}/$f >/dev/null 2>&1 || :
[ -L %{_mandir}/man1/$f.1.gz ] || %{__rm} -f %{_mandir}/man1/$f.1.gz >/dev/null 2>&1 || :
done
# stop and disable timer from previous builds
@ -231,6 +231,9 @@ fi
%config(noreplace) %{_sysconfdir}/cron.daily/man-db.cron
%changelog
* Sun Mar 01 2020 Nikola Forró <nforro@redhat.com> - 2.9.1-6
- fix %pre scriptlet
* Fri Feb 28 2020 Nikola Forró <nforro@redhat.com> - 2.9.1-5
- fix upgrades from non-alternativized versions properly