Fix opensuse 42.3 pip-and-virtualenv

Related to I041a141366099093805e6052b1bbf64efd277e1e, we also need to
remove this on opensuse.  The files for gate testing are added, but
the test is not added to any jobs at this point in the interests of
gate time.

Change-Id: I1af9e84d76bedcb2607717edc6d2abe2920b0584
This commit is contained in:
Ian Wienand 2019-02-22 18:03:50 +11:00
parent 5b1844acf9
commit 37dff9738a
3 changed files with 17 additions and 8 deletions

View File

@ -11,6 +11,8 @@ if [[ $DISTRO_NAME =~ (opensuse|fedora|centos|centos7|rhel7) ]]; then
# Default packages
_do_py3=0
_extra_repo=''
# see notes below on this var...
_clear_old_files=0
case "$DISTRO_NAME" in
centos*|rhel7)
# note python2-pip in epel
@ -23,6 +25,8 @@ if [[ $DISTRO_NAME =~ (opensuse|fedora|centos|centos7|rhel7) ]]; then
else
packages+=" python-setuptools"
fi
# see notes below
_clear_old_files=1
;;
fedora)
_do_py3=1
@ -33,6 +37,7 @@ if [[ $DISTRO_NAME =~ (opensuse|fedora|centos|centos7|rhel7) ]]; then
case "$DIB_RELEASE" in
42*)
packages="python-virtualenv python-pip python-setuptools"
_clear_old_files=1
;;
tumbleweed|15*)
# XXX: python3?
@ -68,15 +73,15 @@ if [[ $DISTRO_NAME =~ (opensuse|fedora|centos|centos7|rhel7) ]]; then
# about to re-install so pip doesn't think anything is installed.
# See: https://github.com/pypa/pip/issues/4805
#
# This is only necessary on CentOS -- for complicated reasons of
# course. On Fedora, the Python2 virtualenv packages are *not*
# distutils based and pip overwrites them correctly. For python3,
# pip has changed to not overwrite system packages (a long
# standing difference between Debuntu and Fedora), but a number of
# tools run with "python3 -Es" to isolate themselves to the
# package installed versions. So we definitely don't want to
# This is only necessary on old CentOS and suse -- for complicated
# reasons of course. On Fedora, the Python2 virtualenv packages
# are *not* distutils based and pip overwrites them correctly.
# For python3, pip has changed to not overwrite system packages (a
# long standing difference between Debuntu and Fedora), but a
# number of tools run with "python3 -Es" to isolate themselves to
# the package installed versions. So we definitely don't want to
# clear the packaged versions out in that case.
if [[ $DISTRO_NAME =~ (centos|centos7|rhel7) ]]; then
if [[ ${_clear_old_files} == 1 ]]; then
for pkg in $packages; do
rpm -ql $pkg | xargs rm -rf
done

View File

@ -0,0 +1,3 @@
openstack-ci-mirrors
opensuse-minimal