From a546b76407e1ce346284efe91c127d058f5bb13b Mon Sep 17 00:00:00 2001 From: Sean Mooney Date: Fri, 10 Dec 2021 11:48:14 +0000 Subject: [PATCH] remove python3-logutils this change ensure that python3-logutils is removed so that that it cna be installed by pip later Closes-bug: #1954427 Change-Id: Icb63649b252fd6eb229adeae454b5ec3c6b79cad --- devstack/lib/ceph | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/devstack/lib/ceph b/devstack/lib/ceph index 57e387e..be43af9 100755 --- a/devstack/lib/ceph +++ b/devstack/lib/ceph @@ -893,6 +893,19 @@ function install_ceph_remote { if python3_enabled; then install_package python3-cephfs python3-prettytable python3-rados python3-rbd python3-requests fi + # Since pip10, pip will refuse to uninstall files from packages + # that were created with distutils (rather than more modern + # setuptools). This is because it technically doesn't have a + # manifest of what to remove. However, in most cases, simply + # overwriting works. So this hacks around those packages that + # have been dragged in by some other system dependency + if is_ubuntu; then + sudo rm -rf /usr/lib/python3/dist-packages/logutils*.egg-info + fi + if is_fedora; then + sudo rm -rf /usr/lib64/python3*/site-packages/logutils*.egg-info + fi + } function dnf_add_repository_ceph { @@ -1148,6 +1161,13 @@ function install_ceph { else die $LINENO "${os_VENDOR} is not supported by the Ceph plugin for Devstack" fi + if is_ubuntu; then + sudo rm -rf /usr/lib/python3/dist-packages/logutils*.egg-info + fi + if is_fedora; then + sudo rm -rf /usr/lib64/python3*/site-packages/logutils*.egg-info + fi + } # start_ceph() - Start running processes, including screen