From 08caa8034db1e6cad32894bb76bcbe8b4d420381 Mon Sep 17 00:00:00 2001 From: "Chandan Kumar (raukadah)" Date: Mon, 8 Jul 2019 16:54:30 +0530 Subject: [PATCH] [RHEL-8] Set _clear_old_files=0 in install-pip element When virtualenv and setuptools gots installed from source and rpm then their installation path lives at different places but when the python script got called then that time it choses either of rpm or source based path on system wide installation and leads to different failure as their methods are not implemeted. So by setting _clear_old_files to 0 will install python3-virtualenv python3-pip python3-setuptools from rpms only and avoid these failures. Change-Id: I0c162f1fe8168513e352546ab8dd2b68fa65b88c Signed-off-by: Chandan Kumar (raukadah) --- .../install.d/pip-and-virtualenv-source-install/04-install-pip | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip b/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip index fa38f8f3..8c3d2a82 100755 --- a/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip +++ b/diskimage_builder/elements/pip-and-virtualenv/install.d/pip-and-virtualenv-source-install/04-install-pip @@ -34,15 +34,16 @@ if [[ $DISTRO_NAME =~ (opensuse|fedora|centos|centos7|rhel|rhel7) ]]; then packages+=" python3-virtualenv python3-pip python3-setuptools" ;; rhel) - _clear_old_files=1 case "$DIB_RELEASE" in 8) _do_py3=1 + _clear_old_files=0 packages=" python3-virtualenv python3-pip python3-setuptools" ;; 7) # note python2-pip in epel _extra_repo="--enablerepo=epel" + _clear_old_files=1 packages="python-virtualenv python2-pip" if [[ "$(rpm -q --qf '[%{obsoletes}\n]' python2-setuptools)" == "python-setuptools" ]]; then packages+=" python2-setuptools"