mockbuild.sh: use dnf to install local package, not rpm

DNF has more elaborate locking system and can wait for other instances of
itself when installing packages. Using rpm directly to install local
package is causing failures in CI due to it not being able to acquire
lock on `/var/lib/rpm/.rpm.lock`.

Using DNF should improve the situation, although there is no good
documentation to link and support this claim for sure.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2023-04-24 16:58:13 +02:00 committed by Tomáš Hozza
parent bb406d11fe
commit feb216c07b

View file

@ -90,7 +90,7 @@ if [[ $ID == rhel || $ID == centos ]] && ! rpm -q epel-release; then
greenprint "📦 Setting up EPEL repository"
curl -Ls --retry 5 --output /tmp/epel.rpm \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-${VERSION_ID%.*}.noarch.rpm
sudo rpm -Uvh /tmp/epel.rpm
sudo dnf install -y /tmp/epel.rpm
fi
# Install requirements for building RPMs in mock.