Commit 48654dfc authored by Michal Nowikowski's avatar Michal Nowikowski

hammer: added more retries in case of error in apt update

parent 313f2854
......@@ -1477,10 +1477,12 @@ def _build_native_pkg(system, revision, features, tarball_path, env, check_times
# install our freeradius-client but now from deb
execute("echo 'deb %s kea main' | sudo tee /etc/apt/sources.list.d/isc.list" % repo_url)
execute("sudo apt-key adv --fetch-keys %s/repository/repo-keys/repo-key.gpg" % repository_url)
_, out = execute('sudo apt update', capture=True)
if 'Bad header data' in out:
# try apt update for up to 10 times if there is an error
for _ in range(10):
_, out = execute('sudo apt update', capture=True)
if 'Bad header data' not in out:
break
time.sleep(4)
execute('sudo apt update')
install_pkgs('libfreeradius-client libfreeradius-client-dev', env=env, check_times=check_times)
# unpack tarball
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment