From c196fd573bc06b02b42b67a8cfe5371ecbddc41fca5170abf1fea6893bbad821 Mon Sep 17 00:00:00 2001 From: Nico Krapp Date: Wed, 4 Jun 2025 15:23:22 +0000 Subject: [PATCH] Accepting request 1282831 from home:fstegmeier:branches:devel:languages:python - fix usage of libalternatives OBS-URL: https://build.opensuse.org/request/show/1282831 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bashate?expand=0&rev=23 --- python-bashate.changes | 5 +++++ python-bashate.spec | 13 ++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/python-bashate.changes b/python-bashate.changes index 96e143a..4187c2c 100644 --- a/python-bashate.changes +++ b/python-bashate.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 4 15:10:04 UTC 2025 - Felix Stegmeier + +- fix usage of libalternatives + ------------------------------------------------------------------- Tue May 13 16:19:58 UTC 2025 - Markéta Machová diff --git a/python-bashate.spec b/python-bashate.spec index b873c0c..c5a8d89 100644 --- a/python-bashate.spec +++ b/python-bashate.spec @@ -16,6 +16,7 @@ # +%bcond_without libalternatives %{?!python_module:%define python_module() python-%{**} python3-%{**}} %global skip_python2 1 Name: python-bashate @@ -32,14 +33,14 @@ BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module testtools} BuildRequires: %{python_module wheel} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros # OpenStack package: stestr is only available for primary python3, only test on this flavor BuildRequires: python3-stestr +Requires: alts Requires: python-Babel >= 0.9.6 Requires: python-pbr -Requires(post): alts -Requires(postun): alts BuildArch: noarch %ifpython2 Requires: python-argparse @@ -77,11 +78,9 @@ sed -i -e '/^#!\//, 1d' %{buildroot}%{$python_sitelib}/bashate/bashate.py %check python3 -m stestr.cli run -%post -%python_install_alternative bashate - -%postun -%python_uninstall_alternative bashate +%pre +# Removing old update-alternatives entries. +%python_libalternatives_reset_alternative bashate %files %{python_files} %license LICENSE