From 45caadc2416c64cd21f908440ee4099d0e2ec77091c077e91b4839b0494f59a2 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 11 Aug 2022 09:00:12 +0000 Subject: [PATCH] Drop usage of update-alternatives, do conflict with mandoc OBS-URL: https://build.opensuse.org/package/show/Base:System/man?expand=0&rev=130 --- man.changes | 6 ++++++ man.spec | 25 +------------------------ 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/man.changes b/man.changes index f709809..0b2fe4f 100644 --- a/man.changes +++ b/man.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Aug 11 08:56:58 UTC 2022 - Dr. Werner Fink + +- Drop usage of update-alternatives as mandoc does not use it + (nor libalternative) + ------------------------------------------------------------------- Sat May 7 12:17:53 UTC 2022 - Marcus Meissner diff --git a/man.spec b/man.spec index 1fec56f..c12b18e 100644 --- a/man.spec +++ b/man.spec @@ -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}