Install python2-pip in the test VM and disable EPEL repo

so we don't use EPEL when actually building the images

Related: rhbz#1698366
This commit is contained in:
Alexander Todorov 2019-08-01 14:34:57 +03:00 committed by Alexander Todorov
parent 2136d88cd6
commit 89e56aa3b4
2 changed files with 27 additions and 2 deletions

View File

@ -29,6 +29,27 @@ if ! rpm -q beakerlib; then
fi fi
fi fi
EPEL_REPO="/etc/yum.repos.d/epel7.repo"
if [ ! -f "$EPEL_REPO" ]; then
cat > $EPEL_REPO << __EOF__
[epel7]
name=epel7
failovermethod=priority
enabled=1
skip_if_unavailable=0
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=\$basearch
gpgcheck=0
__EOF__
fi
# EPEL packages used in tests
if ! rpm -q python2-pip; then
yum -y install python2-pip
fi
# don't build images with EPEL enabled
rm -f $EPEL_REPO
if rpm -q python2-cryptography; then if rpm -q python2-cryptography; then
yum remove -y python2-cryptography yum remove -y python2-cryptography
fi fi

View File

@ -39,8 +39,12 @@ rlJournalStart
rlLogInfo "OS_PASSWORD is configured" rlLogInfo "OS_PASSWORD is configured"
fi fi
rlRun -t -c "yum -y install python2-pip python-virtualenv" if ! rlCheckRpm "python2-pip"; then
rlRun -t -c "yum -y install python2-pip"
rlAssertRpm python2-pip rlAssertRpm python2-pip
fi
rlRun -t -c "yum -y install python-virtualenv"
rlAssertRpm python-virtualenv rlAssertRpm python-virtualenv
rlRun -t -c "virtualenv $VENV" rlRun -t -c "virtualenv $VENV"