From 9c9fe94dd0d0adb9271668abeda92ec2d46ce99a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Forr=C3=B3?= Date: Fri, 28 Feb 2020 18:16:40 +0100 Subject: [PATCH] Fix upgrades from non-alternativized versions --- groff.spec | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/groff.spec b/groff.spec index 698a013..479f8d3 100644 --- a/groff.spec +++ b/groff.spec @@ -3,7 +3,7 @@ Summary: A document formatting system Name: groff Version: 1.22.3 -Release: 22%{?dist} +Release: 23%{?dist} License: GPLv3+ and GFDL and BSD and MIT URL: http://www.gnu.org/software/groff/ Source: ftp://ftp.gnu.org/gnu/groff/groff-%{version}.tar.gz @@ -156,6 +156,10 @@ popd # /bin/sed moved to /usr/bin/sed in Fedora sed --in-place 's|#! /bin/sed -f|#! /usr/bin/sed -f|' %{buildroot}%{_datadir}/groff/%{version}/font/devps/generate/symbol.sed +%pre +# remove alternativized files if they are not symlinks +[ -L %{_mandir}/man7/roff.7.gz ] || rm -f %{_mandir}/man7/roff.7.gz + %post # set up the alternatives files %{_sbindir}/update-alternatives --install %{_mandir}/man7/roff.7.gz roff.7.gz %{_mandir}/man7/roff.%{name}.7.gz 300 \ @@ -173,6 +177,11 @@ if [ $1 -ge 1 ]; then fi fi +%pre base +# remove alternativized files if they are not symlinks +[ -L %{_bindir}/soelim ] || rm -f %{_bindir}/soelim +[ -L %{_mandir}/man1/soelim.1.gz ] || rm -f %{_mandir}/man1/soelim.1.gz + %post base # set up the alternatives files %{_sbindir}/update-alternatives --install %{_bindir}/soelim soelim %{_bindir}/soelim.%{name} 300 \ @@ -462,6 +471,9 @@ fi %doc %{_pkgdocdir}/pdf/ %changelog +* Fri Feb 28 2020 Nikola Forró - 1.22.3-23 +- Fix upgrades from non-alternativized versions + * Wed Feb 26 2020 Nikola Forró - 1.22.3-22 - Use alternatives for soelim and roff.7