diff --git a/python-docutils.changes b/python-docutils.changes index 26a5360..fafe3e3 100644 --- a/python-docutils.changes +++ b/python-docutils.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Fri Jan 17 09:00:56 UTC 2025 - Nico Krapp + +- fix alternatives + +------------------------------------------------------------------- +Wed Jan 15 13:51:33 UTC 2025 - Nico Krapp + +- Use libalternatives instead of update-alternatives, bsc#1235783 + ------------------------------------------------------------------- Sun Nov 3 05:32:05 UTC 2024 - Steve Kowalik diff --git a/python-docutils.spec b/python-docutils.spec index ddd4cc5..10f3cc6 100644 --- a/python-docutils.spec +++ b/python-docutils.spec @@ -1,7 +1,7 @@ # # spec file for package python-docutils # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -25,6 +25,13 @@ %define psuffix %{nil} %bcond_with test %endif + +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif + Name: python-docutils%{psuffix} Version: 0.21.2 Release: 0 @@ -38,9 +45,14 @@ BuildRequires: %{python_module flit-core} BuildRequires: %{python_module pip} BuildRequires: fdupes BuildRequires: python-rpm-macros +%if %{with libalternatives} +Requires: alts +BuildRequires: alts +%else Requires(pre): update-alternatives Requires(post): update-alternatives Requires(postun): update-alternatives +%endif Recommends: python-Pillow Recommends: python-Pygments Recommends: python-roman @@ -102,6 +114,8 @@ done # sometime ago rst2html was the master which would let fail the upgrade with master docutils in post below %pre update-alternatives --query rst2html >/dev/null 2>&1 && update-alternatives --quiet --remove-all rst2html ||: +# If libalternatives is used: Removing old update-alternatives entries. +%python_libalternatives_reset_alternative docutils %post %python_install_alternative docutils rst2html rst2latex rst2man rst2odt rst2pseudoxml rst2s5 rst2xetex rst2xml rst2html4 rst2html5