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: v15.1.0~2518^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=55bc3493f0cba246f203c2908810db3ec22662d3;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 --- diff --git a/ceph.spec.in b/ceph.spec.in index 708d81fd6767..a70f72a81dc5 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -733,6 +733,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. @@ -758,6 +762,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. @@ -845,6 +853,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. @@ -903,6 +915,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.