Drop usage of update-alternatives, do conflict with mandoc

OBS-URL: https://build.opensuse.org/package/show/Base:System/man?expand=0&rev=130
This commit is contained in:
Dr. Werner Fink 2022-08-11 09:00:12 +00:00 committed by Git OBS Bridge
parent 37c7cf0e59
commit 45caadc241
2 changed files with 7 additions and 24 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Aug 11 08:56:58 UTC 2022 - Dr. Werner Fink <werner@suse.de>
- Drop usage of update-alternatives as mandoc does not use it
(nor libalternative)
-------------------------------------------------------------------
Sat May 7 12:17:53 UTC 2022 - Marcus Meissner <meissner@suse.com>

View File

@ -71,10 +71,10 @@ BuildRequires: libzio-devel
BuildRequires: man-pages
BuildRequires: pkgconfig
BuildRequires: po4a
BuildRequires: update-alternatives
BuildRequires: zlib-devel
BuildRequires: zstd
BuildRequires: pkgconfig(systemd)
Conflicts: mandoc
Requires: glibc-locale-base
Suggests: glibc-locale
Requires: groff >= 1.18
@ -83,9 +83,7 @@ Requires: libalternatives1
# FIXME: use proper Requires(pre/post/preun/...)
PreReq: coreutils
PreReq: fillup
Requires(post): update-alternatives
Requires(posttrans):systemd
Requires(postun):update-alternatives
Requires(pre): group(man)
Requires(pre): user(man)
Provides: man_db
@ -296,24 +294,6 @@ test -d var/catman/ && rm -rf var/catman/ || true
%service_add_post man-db.service man-db.timer
%endif
%endif
# Remark: soelim(1) is part of package groff or mandoc and
# makewhatis(8) is part of package makewhat or mandoc
%{_sbindir}/update-alternatives --quiet --force \
--install %{_bindir}/man man %{_libexecdir}/man-db/wrapper 1010 \
--slave %{_bindir}/apropos apropos %{_libexecdir}/man-db/whatis \
--slave %{_bindir}/whatis whatis %{_libexecdir}/man-db/whatis \
--slave %{_mandir}/man1/man.1%{?ext_man} man.1%{?ext_man} %{_mandir}/man1/man-db.1%{?ext_man} \
--slave %{_mandir}/man1/apropos.1%{?ext_man} apropos.1%{?ext_man} %{_mandir}/man1/apropos-db.1%{?ext_man} \
--slave %{_mandir}/man1/whatis.1%{?ext_man} whatis.1%{?ext_man} %{_mandir}/man1/whatis-db.1%{?ext_man}
# Old man packages did not apply the proper update-alternatives calls to ensure
# alternative path move. As a result, the alternative path move induced by
# libexecdir move breaks man wrapper (boo#1175919). Hence the following migration
# code for upgrades from Leap 15.2 or Tumbleweed snapshots older than 20200826.
# To be removed when support for upgrades from Leap 15.2 is dropped (dec. 2021).
if [ %{_libexecdir} != %{_prefix}/lib ] && [ -f %{_prefix}/lib/man-db/wrapper ] ; then
update-alternatives --quiet --remove man %{_prefix}/lib/man-db/wrapper
fi
%preun
%if %{with sdtimer}
@ -331,9 +311,6 @@ fi
%service_del_postun man-db.service man-db.timer
%endif
%endif
if [ ! -f %{_libexecdir}/man-db/wrapper ] ; then
update-alternatives --quiet --remove man %{_libexecdir}/man-db/wrapper
fi
%posttrans
%{?tmpfiles_create:%tmpfiles_create %{_prefix}/lib/tmpfiles.d/man-db.conf}