From: Nathan Cutler Date: Thu, 18 Apr 2019 16:32:17 +0000 (+0200) Subject: rpm: have py3 RPMs provide/obsolete py2 predecessors X-Git-Tag: v14.2.2~64^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F28469%2Fhead;p=ceph.git 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) --- 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.