tests: Fix the repos used for the test

Use a limited set of repos to prevent problems like conflicting
system-release packages.

Related: RHEL-67586
This commit is contained in:
Brian C. Lane 2024-11-15 16:27:48 -08:00
parent 3e2b23e954
commit e10b679c2e

View File

@ -6,11 +6,16 @@ if [ ! -e /usr/share/lorax/templates.d/80-rhel/ ]; then
exit 1 exit 1
fi fi
# Gather up the list of system repo files and use them for lorax # NOTE: This must be able to run both on the Zuul using centos repos and on osci gating using rhel
# Skip fedora.repo # so filter for the list of allowed repos
REPOS=$(find /etc/yum.repos.d/ -maxdepth 1 -type f -name '*\.repo' ! -name 'fedora.repo' -exec echo -n "--repo {} " \;) REPODIR="/etc/yum.repos.d"
REPOFILES="rhel.repo centos.repo test-artifacts.repo"
REPOS=""
for r in $REPOFILES; do
[ -e "$REPODIR/$r" ] && REPOS+="--repo $REPODIR/$r "
done
if [ -z "$REPOS" ]; then if [ -z "$REPOS" ]; then
echo "No system repos found" echo "No repos ($REPOFILES) found in $REPODIR"
exit 1 exit 1
fi fi