From 43b75df18e7adde00f23a6af5895a7508184ae23d80b29e8f612bdbb1966a533 Mon Sep 17 00:00:00 2001 From: Nico Krapp Date: Wed, 16 Jul 2025 11:18:50 +0000 Subject: [PATCH] Accepting request 1293776 from home:nkrapp:FrameworkLaptop - migrate from update-alternatives to libalternatives OBS-URL: https://build.opensuse.org/request/show/1293776 OBS-URL: https://build.opensuse.org/package/show/hardware/python-framework16_inputmodule?expand=0&rev=7 --- python-framework16_inputmodule.changes | 5 +++++ python-framework16_inputmodule.spec | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/python-framework16_inputmodule.changes b/python-framework16_inputmodule.changes index 5d9313f..aca8db3 100644 --- a/python-framework16_inputmodule.changes +++ b/python-framework16_inputmodule.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 4 12:57:49 UTC 2025 - Nico Krapp + +- migrate from update-alternatives to libalternatives + ------------------------------------------------------------------- Wed Apr 16 12:15:57 UTC 2025 - Nico Krapp diff --git a/python-framework16_inputmodule.spec b/python-framework16_inputmodule.spec index 902e00b..7cc4812 100644 --- a/python-framework16_inputmodule.spec +++ b/python-framework16_inputmodule.spec @@ -17,6 +17,7 @@ # +%bcond_without libalternatives %define stable_version 0.1.1 %define reponame inputmodule-rs %{?sle15_python_module_python} @@ -32,8 +33,10 @@ BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module hatchling} BuildRequires: %{python_module pip} BuildRequires: %{python_module pyserial} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: alts Requires: framework-inputmodule-control Requires: python-Pillow Requires: python-base >= 3.7 @@ -41,8 +44,6 @@ Requires: python-getkey Requires: python-pygame Requires: python-pyserial Requires: python-tk -Requires(post): update-alternatives -Requires(postun): update-alternatives BuildArch: noarch %python_subpackages @@ -66,11 +67,11 @@ cd python/ %python_clone -a %{buildroot}%{_bindir}/ledmatrixgui %python_expand %fdupes %{buildroot}%{$python_sitelib} -%post -%python_install_alternative ledmatrixctl ledmatrixgui +%pre +# removing old update-alternatives entries +%python_libalternatives_reset_alternative ledmatrixctl ledmatrixgui -%postun -%python_uninstall_alternative ledmatrixctl ledmatrixgui +# post and postun macro call is not needed with only libalternatives %files %{python_files} %license LICENSE