From 902d5866bb493e0a076d04ceef67a280479abfa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= Date: Fri, 28 Feb 2020 18:05:54 +0100 Subject: [PATCH] fix upgrades from non-alternativized versions properly --- man-db.spec | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/man-db.spec b/man-db.spec index d565f6a..0502cf2 100644 --- a/man-db.spec +++ b/man-db.spec @@ -4,7 +4,7 @@ Summary: Tools for searching and reading man pages Name: man-db Version: 2.9.1 -Release: 4%{?dist} +Release: 5%{?dist} # GPLv2+ .. man-db # GPLv3+ .. gnulib License: GPLv2+ and GPLv3+ @@ -116,8 +116,11 @@ install -D -p -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_unitdir}/man-db-restart-cache %find_lang %{name}-gnulib %pre -# /usr/bin/man is now alternativized, so if it is not a symlink, remove it -[ -L %{_bindir}/man ] || rm -f %{_bindir}/man +# 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 +done # stop and disable timer from previous builds if [ -e /usr/lib/systemd/system/mandb.timer ]; then @@ -228,6 +231,9 @@ fi %config(noreplace) %{_sysconfdir}/cron.daily/man-db.cron %changelog +* Fri Feb 28 2020 Nikola Forró - 2.9.1-5 +- fix upgrades from non-alternativized versions properly + * Fri Feb 28 2020 Nikola Forró - 2.9.1-4 - fix upgrades from non-alternativized versions