From ef7e755553892f1e4041ce85f6a907d83352c375 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Thu, 18 Apr 2019 18:32:17 +0200 Subject: [PATCH] rpm: have py3 RPMs provide/obsolete py2 predecessors When upgrading from a Python 2 build to a Python 3 one, we need to make the python3-* packages replace their Python 2 counterparts. Fixes: http://tracker.ceph.com/issues/40099 Signed-off-by: Nathan Cutler (cherry picked from commit 55bc3493f0cba246f203c2908810db3ec22662d3) --- ceph.spec.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ceph.spec.in b/ceph.spec.in index 1c1eece4c537..937e9d4f3148 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -719,6 +719,10 @@ Group: Development/Libraries/Python Requires: librgw2 = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} Provides: python3-rgw = %{_epoch_prefix}%{version}-%{release} +%if 0%{without python2} +Provides: python-rgw = %{_epoch_prefix}%{version}-%{release} +Obsoletes: python-rgw < %{_epoch_prefix}%{version}-%{release} +%endif %description -n python%{python3_pkgversion}-rgw This package contains Python 3 libraries for interacting with Cephs RADOS gateway. @@ -744,6 +748,10 @@ Group: Development/Libraries/Python Requires: python%{python3_pkgversion} Requires: librados2 = %{_epoch_prefix}%{version}-%{release} Provides: python3-rados = %{_epoch_prefix}%{version}-%{release} +%if 0%{without python2} +Provides: python-rados = %{_epoch_prefix}%{version}-%{release} +Obsoletes: python-rados < %{_epoch_prefix}%{version}-%{release} +%endif %description -n python%{python3_pkgversion}-rados This package contains Python 3 libraries for interacting with Cephs RADOS object store. @@ -831,6 +839,10 @@ Group: Development/Libraries/Python Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} Provides: python3-rbd = %{_epoch_prefix}%{version}-%{release} +%if 0%{without python2} +Provides: python-rbd = %{_epoch_prefix}%{version}-%{release} +Obsoletes: python-rbd < %{_epoch_prefix}%{version}-%{release} +%endif %description -n python%{python3_pkgversion}-rbd This package contains Python 3 libraries for interacting with Cephs RADOS block device. @@ -889,6 +901,10 @@ Requires: libcephfs2 = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-rados = %{_epoch_prefix}%{version}-%{release} Requires: python%{python3_pkgversion}-ceph-argparse = %{_epoch_prefix}%{version}-%{release} Provides: python3-cephfs = %{_epoch_prefix}%{version}-%{release} +%if 0%{without python2} +Provides: python-cephfs = %{_epoch_prefix}%{version}-%{release} +Obsoletes: python-cephfs < %{_epoch_prefix}%{version}-%{release} +%endif %description -n python%{python3_pkgversion}-cephfs This package contains Python 3 libraries for interacting with Cephs distributed file system. -- 2.47.3