From 67b7b9a7b359fb0ee6dbbf1333b34866adb1571450fecc16359a381924ece1af Mon Sep 17 00:00:00 2001 From: Daniel Garcia Moreno Date: Thu, 23 Oct 2025 11:45:39 +0200 Subject: [PATCH] Convert to libalternatives, bsc#1245883 --- python-pkginfo.changes | 10 ++++++++++ python-pkginfo.spec | 15 ++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/python-pkginfo.changes b/python-pkginfo.changes index 18b7fdb..05b0a7a 100644 --- a/python-pkginfo.changes +++ b/python-pkginfo.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Aug 21 15:25:03 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems only + +------------------------------------------------------------------- +Sat Jul 19 07:28:46 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Tue Feb 25 21:03:21 UTC 2025 - Dirk Müller diff --git a/python-pkginfo.spec b/python-pkginfo.spec index 9ada1d0..4634877 100644 --- a/python-pkginfo.spec +++ b/python-pkginfo.spec @@ -16,6 +16,11 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-pkginfo Version: 1.12.1.2 @@ -32,9 +37,14 @@ BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-setuptools +BuildArch: noarch +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else Requires(post): update-alternatives Requires(postun): update-alternatives -BuildArch: noarch +%endif # SECTION test requirements BuildRequires: %{python_module pytest} BuildRequires: %{python_module wheel} @@ -71,6 +81,9 @@ sed -iE "s/_make_installed('wheel')/_make_installed('wheel', metadata_version='2 %postun %python_uninstall_alternative pkginfo +%pre +%python_libalternatives_reset_alternative pkginfo + %files %{python_files} %license LICENSE.txt %doc README.txt CHANGES.txt TODO.txt