Accepting request 923302 from home:schubi2

- Use libalternatives instead of update-alternatives.

OBS-URL: https://build.opensuse.org/request/show/923302
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=17
This commit is contained in:
Benjamin Greiner 2021-10-06 09:14:43 +00:00 committed by Git OBS Bridge
parent f98d98f24e
commit 979b3dbaea
2 changed files with 24 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Oct 5 15:35:48 UTC 2021 - Stefan Schubert <schubi@suse.de>
- Use libalternatives instead of update-alternatives.
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Feb 3 22:46:22 UTC 2021 - Benjamin Greiner <code@bnavigator.de> Wed Feb 3 22:46:22 UTC 2021 - Benjamin Greiner <code@bnavigator.de>

View File

@ -1,5 +1,5 @@
# #
# spec file for package python-jupyter-core-test # spec file for package python-jupyter-core
# #
# Copyright (c) 2021 SUSE LLC # Copyright (c) 2021 SUSE LLC
# #
@ -16,6 +16,13 @@
# #
#
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%global flavor @BUILD_FLAVOR@%{nil} %global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test" %if "%{flavor}" == "test"
%define psuffix -test %define psuffix -test
@ -40,11 +47,16 @@ BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module traitlets} BuildRequires: %{python_module traitlets}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: jupyter-jupyter_core-filesystem BuildRequires: jupyter-jupyter_core-filesystem
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros >= 20210929
Requires: jupyter-jupyter_core-filesystem Requires: jupyter-jupyter_core-filesystem
Requires: python-traitlets Requires: python-traitlets
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives Requires(post): update-alternatives
Requires(postun):update-alternatives Requires(postun):update-alternatives
%endif
Recommends: python-ipython Recommends: python-ipython
Provides: python-jupyter_core = %{version}-%{release} Provides: python-jupyter_core = %{version}-%{release}
Obsoletes: python-jupyter_core < %{version}-%{release} Obsoletes: python-jupyter_core < %{version}-%{release}
@ -101,6 +113,11 @@ pushd jupyter_core/tests
popd popd
%endif %endif
%pre
# removing old update-alternatives entries
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative jupyter
%post %post
%python_install_alternative jupyter jupyter-migrate jupyter-troubleshoot %python_install_alternative jupyter jupyter-migrate jupyter-troubleshoot