Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] set apt Acquire::Retries to 3 for bullseye #12758

Merged
merged 1 commit into from
Nov 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ sudo LANG=C chroot $FILESYSTEM_ROOT mount
## Pointing apt to public apt mirrors and getting latest packages, needed for latest security updates
scripts/build_mirror_config.sh files/apt $CONFIGURED_ARCH $IMAGE_DISTRO
sudo cp files/apt/sources.list.$CONFIGURED_ARCH $FILESYSTEM_ROOT/etc/apt/sources.list
sudo cp files/apt/apt.conf.d/{81norecommends,apt-{clean,gzip-indexes,no-languages},no-check-valid-until} $FILESYSTEM_ROOT/etc/apt/apt.conf.d/
sudo cp files/apt/apt.conf.d/{81norecommends,apt-{clean,gzip-indexes,no-languages},no-check-valid-until,apt-multiple-retries} $FILESYSTEM_ROOT/etc/apt/apt.conf.d/

## Note: set lang to prevent locale warnings in your chroot
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y update
Expand Down
1 change: 1 addition & 0 deletions dockers/docker-base-bullseye/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ COPY ["dpkg_01_drop", "/etc/dpkg/dpkg.cfg.d/01_drop"]
COPY ["sources.list.{{ CONFIGURED_ARCH }}", "/etc/apt/sources.list"]
COPY ["no_install_recommend_suggest", "/etc/apt/apt.conf.d"]
COPY ["no-check-valid-until", "/etc/apt/apt.conf.d"]
COPY ["apt-multiple-retries", "/etc/apt/apt.conf.d"]

# Update apt cache and
# pre-install fundamental packages
Expand Down
4 changes: 4 additions & 0 deletions dockers/docker-base-bullseye/apt-multiple-retries
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Instruct apt to retry downloads on failures
# This is required only for bullseye.

Acquire::Retries "3";
4 changes: 4 additions & 0 deletions files/apt/apt.conf.d/apt-multiple-retries
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Instruct apt to retry downloads on failures
# This is required only for bullseye.

Acquire::Retries "3";
1 change: 1 addition & 0 deletions sonic-slave-bullseye/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ FROM {{ prefix }}debian:bullseye
MAINTAINER [email protected]

COPY ["no-check-valid-until", "/etc/apt/apt.conf.d/"]
COPY ["apt-multiple-retries", "/etc/apt/apt.conf.d/"]

{%- if CROSS_BUILD_ENVIRON != "y" %}
COPY ["sources.list.{{ CONFIGURED_ARCH }}", "/etc/apt/sources.list"]
Expand Down
4 changes: 4 additions & 0 deletions sonic-slave-bullseye/apt-multiple-retries
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Instruct apt to retry downloads on failures
# This is required only for bullseye.

Acquire::Retries "3";