From 54863dbd308dae33c0034226b1b4e9d55e66118f9f97fc38cc82c902e53e1dbd Mon Sep 17 00:00:00 2001 From: Nico Krapp Date: Wed, 4 Jun 2025 15:22:09 +0000 Subject: [PATCH] - fix usage of libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ZODB?expand=0&rev=35 --- python-ZODB.changes | 5 +++++ python-ZODB.spec | 15 ++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/python-ZODB.changes b/python-ZODB.changes index d3008cb..0326022 100644 --- a/python-ZODB.changes +++ b/python-ZODB.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 4 15:21:36 UTC 2025 - Nico Krapp + +- fix usage of libalternatives + ------------------------------------------------------------------- Tue May 13 12:06:18 UTC 2025 - Markéta Machová diff --git a/python-ZODB.spec b/python-ZODB.spec index 06cb7b3..c781580 100644 --- a/python-ZODB.spec +++ b/python-ZODB.spec @@ -17,6 +17,7 @@ # +%bcond_without libalternatives Name: python-ZODB Version: 6.0.1 Release: 0 @@ -37,8 +38,10 @@ BuildRequires: %{python_module zodbpickle >= 1.0.1} BuildRequires: %{python_module zope.interface} BuildRequires: %{python_module zope.testing} BuildRequires: %{python_module zope.testrunner >= 4.4.6} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: alts Requires: python-BTrees >= 4.2.0 Requires: python-ZConfig Requires: python-persistent >= 4.4.0 @@ -46,8 +49,6 @@ Requires: python-transaction >= 2.4.0 Requires: python-zc.lockfile Requires: python-zodbpickle >= 1.0.1 Requires: python-zope.interface -Requires(post): alts -Requires(preun): alts Conflicts: fstail BuildArch: noarch %python_subpackages @@ -67,7 +68,7 @@ Provides: %{python_module ZODB-doc = %{version}} This package contains documentation files for %{name}. %prep -%setup -q -n zodb-%{version} +%autosetup -p1 -n zodb-%{version} # delete backup files find . -name "*~" -print -delete # remove unwanted shebang @@ -96,11 +97,11 @@ cp -r docs/* %{buildroot}%{_defaultdocdir}/python-ZODB-doc/docs/ %check %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} zope-testrunner-%{$python_bin_suffix} --test-path=src -%post -%python_install_alternative fsdump fsoids fsrefs fstail repozo +%pre +# If libalternatives is used: Removing old update-alternatives entries. +%python_libalternatives_reset_alternative fsdump fsoids fsrefs fstail repozo -%postun -%python_uninstall_alternative fsdump +# post and postun macro call is not needed with only libalternatives %files %{python_files} %license LICENSE.txt COPYRIGHT.txt