[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) <chkumar@redhat.com>
This commit is contained in:
Chandan Kumar (raukadah) 2019-07-08 16:54:30 +05:30
parent 472be2a144
commit 08caa8034d

View File

@ -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"