[tests] don't add only rel-eng optional repo for live-iso

Adding only rel-eng optional repo for live-iso can cause
broken dependencies if the base repo (nightly) contains
packages in newer versions than what is required by packages
in optional repo.

A better way in the live-iso test is to add a rel-eng or
nightly optional repo based on the already existing repos.

Fixes: rhbz#1826029
This commit is contained in:
Jiri Kortus 2020-04-17 19:31:44 +02:00 committed by Alexander Todorov
parent 14a8e81dda
commit 828a516cb3

View File

@ -16,17 +16,23 @@ CLI="${CLI:-./src/bin/composer-cli}"
rlJournalStart rlJournalStart
rlPhaseStartSetup rlPhaseStartSetup
OPTIONAL_REPO="/etc/yum.repos.d/rhel7-rel-eng-optional.repo" if grep -qE "https?://.*/nightly/" /etc/yum.repos.d/*; then
RELEASE_TYPE="nightly"
else
RELEASE_TYPE="rel-eng"
fi
OPTIONAL_REPO="/etc/yum.repos.d/rhel7-${RELEASE_TYPE}-optional.repo"
if [ ! -f "$OPTIONAL_REPO" ]; then if [ ! -f "$OPTIONAL_REPO" ]; then
composer_stop composer_stop
cat > $OPTIONAL_REPO << __EOF__ cat > $OPTIONAL_REPO << __EOF__
[rhel7-rel-eng-optional] [rhel7-${RELEASE_TYPE}-optional]
gpgcheck=0 gpgcheck=0
enabled=1 enabled=1
skip_if_unavailable=0 skip_if_unavailable=0
name=rhel7-rel-eng-optional name=rhel7-${RELEASE_TYPE}-optional
baseurl=http://download-node-02.eng.bos.redhat.com/rhel-7/rel-eng/latest-RHEL-7/compose/Server-optional/\$basearch/os/ baseurl=http://download-node-02.eng.bos.redhat.com/rhel-7/$RELEASE_TYPE/latest-RHEL-7/compose/Server-optional/\$basearch/os/
__EOF__ __EOF__
composer_start composer_start
fi fi