schutzbot/deploy.sh: remove retry function

It was only used once, to retry dnf. This is not necessary, because dnf
already has retrying logic. We're also not using `retry` on any of the
other calls to dnf in this script.
This commit is contained in:
Lars Karlitski 2020-11-15 10:38:33 +01:00 committed by Tom Gundersen
parent efba431e05
commit 7c44a142a3

View file

@ -1,23 +1,6 @@
#!/bin/bash
set -euxo pipefail
function retry {
local count=0
local retries=5
until "$@"; do
exit=$?
count=$(($count + 1))
if [[ $count -lt $retries ]]; then
echo "Retrying command..."
sleep 1
else
echo "Command failed after ${retries} retries. Giving up."
return $exit
fi
done
return 0
}
# Get OS details.
source /etc/os-release
ARCH=$(uname -m)
@ -68,7 +51,7 @@ fi
# Install the Image Builder packages.
# Note: installing only -tests to catch missing dependencies
retry sudo dnf -y install osbuild-composer-tests
sudo dnf -y install osbuild-composer-tests
# Set up a directory to hold repository overrides.
sudo mkdir -p /etc/osbuild-composer/repositories