diff --git a/python-linux-procfs.changes b/python-linux-procfs.changes index 50f3212..b1423cb 100644 --- a/python-linux-procfs.changes +++ b/python-linux-procfs.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Mar 26 12:30:06 UTC 2025 - Nico Krapp + +- Use libalternatives instead of update-alternatives, bsc#1240096 + ------------------------------------------------------------------- Wed Jan 29 00:41:51 UTC 2025 - Steve Kowalik diff --git a/python-linux-procfs.spec b/python-linux-procfs.spec index fc4c219..6ca62db 100644 --- a/python-linux-procfs.spec +++ b/python-linux-procfs.spec @@ -16,6 +16,12 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif + Name: python-linux-procfs Version: 0.7.3 Release: 0 @@ -29,8 +35,13 @@ BuildRequires: %{python_module six} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-six +%if %{with libalternatives} +Requires: alts +BuildRequires: alts +%else Requires(post): update-alternatives Requires(postun): update-alternatives +%endif BuildArch: noarch %python_subpackages @@ -38,7 +49,7 @@ BuildArch: noarch Abstractions to extract information from the Linux kernel /proc files. %prep -%setup -q +%autosetup -p1 %build %pyproject_wheel @@ -51,6 +62,10 @@ Abstractions to extract information from the Linux kernel /proc files. %check %python_exec bitmasklist_test.py +%pre +# If libalternatives is used: Removing old update-alternatives entries. +%python_libalternatives_reset_alternative pflags + %post %python_install_alternative pflags