fix upgrades from non-alternativized versions

This commit is contained in:
Nikola Forró 2020-02-28 18:28:03 +01:00
parent db7a1a14ff
commit fe6fc82d35

View File

@ -7,7 +7,7 @@
Summary: Linux kernel and C library user-space interface documentation
Name: man-pages
Version: 5.04
Release: 4%{?dist}
Release: 5%{?dist}
License: GPL+ and GPLv2+ and BSD and MIT and Copyright only and IEEE
URL: http://www.kernel.org/doc/man-pages/
Source: http://www.kernel.org/pub/linux/docs/man-pages/man-pages-%{version}.tar.xz
@ -90,6 +90,10 @@ popd
mv %{buildroot}%{_mandir}/man7/man.7 %{buildroot}%{_mandir}/man7/man.%{name}.7
touch %{buildroot}%{_mandir}/man7/man.7
%pre
# remove alternativized files if they are not symlinks
[ -L %{_mandir}/man7/man.7.gz ] || rm -f %{_mandir}/man7/man.7.gz
%post
# set up the alternatives files
%{_sbindir}/update-alternatives --install %{_mandir}/man7/man.7.gz man.7.gz %{_mandir}/man7/man.%{name}.7.gz 300 \
@ -114,6 +118,9 @@ fi
%{_mandir}/man*/*
%changelog
* Fri Feb 28 2020 Nikola Forró <nforro@redhat.com> - 5.04-5
- fix upgrades from non-alternativized versions
* Thu Feb 27 2020 Nikola Forró <nforro@redhat.com> - 5.04-4
- use alternatives for man.7