From 44c022207e66b118d253e336ea5d475b1c363d0ccaea3333999b94f2a60abdff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 26 Aug 2025 09:44:26 +0000 Subject: [PATCH] - Convert to libalternatives on SLE-16-based and newer systems OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xattr?expand=0&rev=54 --- python-xattr.changes | 5 +++++ python-xattr.spec | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/python-xattr.changes b/python-xattr.changes index 4f55450..06d320a 100644 --- a/python-xattr.changes +++ b/python-xattr.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Aug 26 09:44:09 UTC 2025 - Markéta Machová + +- Convert to libalternatives on SLE-16-based and newer systems + ------------------------------------------------------------------- Fri Jun 6 04:19:46 UTC 2025 - Steve Kowalik diff --git a/python-xattr.spec b/python-xattr.spec index 10b1812..939f395 100644 --- a/python-xattr.spec +++ b/python-xattr.spec @@ -1,7 +1,7 @@ # # spec file for package python-xattr # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,11 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-xattr Version: 0.10.1 @@ -32,8 +37,13 @@ BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-cffi >= 1.11 +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else Requires(post): update-alternatives Requires(postun): update-alternatives +%endif %ifpython2 Provides: pyxattr = %{version} Obsoletes: pyxattr < %{version} @@ -71,6 +81,9 @@ export LC_ALL=en_US.utf-8 %postun %python_uninstall_alternative xattr +%pre +%python_libalternatives_reset_alternative xattr + %files %{python_files} %license LICENSE.txt %doc README.rst