diff --git a/lib/functions/rootfs/distro-agnostic.sh b/lib/functions/rootfs/distro-agnostic.sh index 6f4b403dbc..39a13758d8 100644 --- a/lib/functions/rootfs/distro-agnostic.sh +++ b/lib/functions/rootfs/distro-agnostic.sh @@ -245,14 +245,17 @@ function install_distribution_agnostic() { APT_OPTS="y" chroot_sdcard_apt_get clean display_alert "Updating" "apt package lists" - APT_OPTS="y" chroot_sdcard_apt_get update + APT_OPTS="y" do_with_retries 3 chroot_sdcard_apt_get update # install family packages if [[ -n ${PACKAGE_LIST_FAMILY} ]]; then _pkg_list=${PACKAGE_LIST_FAMILY} display_alert "Installing PACKAGE_LIST_FAMILY packages" "${_pkg_list}" + # shellcheck disable=SC2086 # we need to expand here. retry 3 times download-only to counter apt-cacher-ng failures. + do_with_retries 3 chroot_sdcard_apt_get_install_download_only ${_pkg_list} + # shellcheck disable=SC2086 # we need to expand here. - chroot_sdcard_apt_get_install $_pkg_list + chroot_sdcard_apt_get_install ${_pkg_list} fi # install board packages