diff --git a/libpeas1.spec b/libpeas1.spec index dca7a1a..f8171c4 100644 --- a/libpeas1.spec +++ b/libpeas1.spec @@ -24,6 +24,11 @@ BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(pygobject-3.0) 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 libpeas1 is a convenience library making adding plug-ins support 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 Requires: %{name}%{?_isa} = %{version}-%{release} -# As this package was renamed after 1.36.0, obsolete the original package name -# of its first version (libpeas 2, in other words, 1.99.0). -Obsoletes: libpeas-gtk < 1.99.0-1 -# Provide the original version 1 API package name. libpeas 2 does not provide a -# GTK API, so there is no overlap here. -Provides: libpeas-gtk = %{version}-%{release} +# Handle the upgrade path for the -gtk subpackage that moved from libpeas +# package to libpeas1 compat package when the main libpeas package was updated +# to version 2.0. New libpeas 2.0 no longer provides the GTK API, which makes +# the upgrade path easier as this compat package can fully replace the old +# name. +Obsoletes: libpeas-gtk < 2.0 +Conflicts: libpeas-gtk < 2.0 +Provides: libpeas-gtk = %{version}-%{release} +Provides: libpeas-gtk%{?_isa} = %{version}-%{release} %description gtk 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: python3-gobject -# As this package was renamed after 1.36.0, obsolete the original package name -# of its first version (libpeas 2, in other words, 1.99.0). -Obsoletes: libpeas-loader-python3 < 1.99.0-1 -# Provide only the version 1 API package name. Nothing in Fedora depends on the -# unversioned package name, anyway. -Provides: libpeas1-loader-python3 = %{version}-%{release} +# Handle the upgrade path for the -python3 subpackage that moved from libpeas +# package to libpeas1 compat package when the main libpeas package was updated +# to version 2.0. New libpeas 2.0 still provides a python loader, but it's now +# installed under 'libpeas-loader-python' name, which makes it convenient +# because libpeas1-loader-python3 can fully replace libpeas-loader-python3 +# (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 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. Recommends: gi-docgen-fonts -# As this package was renamed after 1.36.0, obsolete the original package name -# of its first version (libpeas 2, in other words, 1.99.0). -Obsoletes: libpeas-devel < 1.99.0-1 -# Not a direct replacement, so no Provides. +# Transition libpeas-devel 1.36 users to the compat package, and conflict with +# the old libpeas-devel version to avoid potential file conflicts on upgrade if +# dnf's obsoletes processing should be disabled. +Obsoletes: libpeas-devel < 2.0 +Conflicts: libpeas-devel < 2.0 %description devel This package contains development libraries and header files