]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rpm: have py3 RPMs provide/obsolete py2 predecessors
authorNathan Cutler <ncutler@suse.com>
Thu, 18 Apr 2019 16:32:17 +0000 (18:32 +0200)
committerNathan Cutler <ncutler@suse.com>
Tue, 4 Jun 2019 22:15:25 +0000 (00:15 +0200)
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 <ncutler@suse.com>
ceph.spec.in

index 708d81fd6767ead1c076cd58e8f3952fdccace03..a70f72a81dc5d32410a94708aebb197eabea50ab 100644 (file)
@@ -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.