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:
parent
3e2b23e954
commit
e10b679c2e
@ -6,11 +6,16 @@ if [ ! -e /usr/share/lorax/templates.d/80-rhel/ ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Gather up the list of system repo files and use them for lorax
|
||||
# Skip fedora.repo
|
||||
REPOS=$(find /etc/yum.repos.d/ -maxdepth 1 -type f -name '*\.repo' ! -name 'fedora.repo' -exec echo -n "--repo {} " \;)
|
||||
# NOTE: This must be able to run both on the Zuul using centos repos and on osci gating using rhel
|
||||
# so filter for the list of allowed repos
|
||||
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
|
||||
echo "No system repos found"
|
||||
echo "No repos ($REPOFILES) found in $REPODIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user