Fix obsoletes and provides

Make sure to provide the old names that other packages require so that
the upgrade path from libpeas 1.36 works correctly.
This commit is contained in:
Kalev Lember 2023-10-25 00:10:51 +02:00
parent 40c464aefe
commit 294b8a2c3a

View File

@ -24,6 +24,11 @@ BuildRequires: pkgconfig(gtk+-3.0)
BuildRequires: pkgconfig(pygobject-3.0) BuildRequires: pkgconfig(pygobject-3.0)
BuildRequires: python3-devel BuildRequires: python3-devel
# Conflict with the old libpeas version to avoid potential file conflicts on
# upgrade, but don't obsolete it so that the correct version (libpeas 2 or
# libpeas1) is pulled in through package dependencies.
Conflicts: libpeas < 2.0
%description %description
libpeas1 is a convenience library making adding plug-ins support libpeas1 is a convenience library making adding plug-ins support
to glib-based applications. For the version based on newer GLib, see the to glib-based applications. For the version based on newer GLib, see the
@ -33,12 +38,15 @@ libpeas package.
Summary: GTK+ 3 plug-ins support for libpeas1 Summary: GTK+ 3 plug-ins support for libpeas1
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
# As this package was renamed after 1.36.0, obsolete the original package name # Handle the upgrade path for the -gtk subpackage that moved from libpeas
# of its first version (libpeas 2, in other words, 1.99.0). # package to libpeas1 compat package when the main libpeas package was updated
Obsoletes: libpeas-gtk < 1.99.0-1 # to version 2.0. New libpeas 2.0 no longer provides the GTK API, which makes
# Provide the original version 1 API package name. libpeas 2 does not provide a # the upgrade path easier as this compat package can fully replace the old
# GTK API, so there is no overlap here. # name.
Provides: libpeas-gtk = %{version}-%{release} Obsoletes: libpeas-gtk < 2.0
Conflicts: libpeas-gtk < 2.0
Provides: libpeas-gtk = %{version}-%{release}
Provides: libpeas-gtk%{?_isa} = %{version}-%{release}
%description gtk %description gtk
libpeas1-gtk is a convenience library making adding plug-ins support libpeas1-gtk is a convenience library making adding plug-ins support
@ -49,12 +57,16 @@ Summary: Python 3 loader for libpeas1
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python3-gobject Requires: python3-gobject
# As this package was renamed after 1.36.0, obsolete the original package name # Handle the upgrade path for the -python3 subpackage that moved from libpeas
# of its first version (libpeas 2, in other words, 1.99.0). # package to libpeas1 compat package when the main libpeas package was updated
Obsoletes: libpeas-loader-python3 < 1.99.0-1 # to version 2.0. New libpeas 2.0 still provides a python loader, but it's now
# Provide only the version 1 API package name. Nothing in Fedora depends on the # installed under 'libpeas-loader-python' name, which makes it convenient
# unversioned package name, anyway. # because libpeas1-loader-python3 can fully replace libpeas-loader-python3
Provides: libpeas1-loader-python3 = %{version}-%{release} # (note the python vs python3).
Obsoletes: libpeas-loader-python3 < 2.0
Conflicts: libpeas-loader-python3 < 2.0
Provides: libpeas-loader-python3 = %{version}-%{release}
Provides: libpeas-loader-python3%{?_isa} = %{version}-%{release}
%description loader-python3 %description loader-python3
This package contains the Python 3 loader that is needed to This package contains the Python 3 loader that is needed to
@ -69,10 +81,11 @@ Requires: %{name}-gtk%{?_isa} = %{version}-%{release}
# this metapackage to ensure the proper system fonts are present. # this metapackage to ensure the proper system fonts are present.
Recommends: gi-docgen-fonts Recommends: gi-docgen-fonts
# As this package was renamed after 1.36.0, obsolete the original package name # Transition libpeas-devel 1.36 users to the compat package, and conflict with
# of its first version (libpeas 2, in other words, 1.99.0). # the old libpeas-devel version to avoid potential file conflicts on upgrade if
Obsoletes: libpeas-devel < 1.99.0-1 # dnf's obsoletes processing should be disabled.
# Not a direct replacement, so no Provides. Obsoletes: libpeas-devel < 2.0
Conflicts: libpeas-devel < 2.0
%description devel %description devel
This package contains development libraries and header files This package contains development libraries and header files