mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 05:55:28 +00:00
hammer: added more retries in case of error in apt update
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user