Add -o Acquire::Retries=3 to fix some stupid issues happening sometimes

This commit is contained in:
Alexandre Aubin 2020-06-03 19:29:32 +02:00
parent c8b06bd8aa
commit 03432349d7
4 changed files with 6 additions and 5 deletions

View file

@ -16,7 +16,7 @@ upgrade:
extends: .install-stage
image: "after-install"
script:
- apt update
- apt-get update -o Acquire::Retries=3
- DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ./$YNH_BUILD_DIR/*.deb
@ -24,7 +24,8 @@ install-postinstall:
extends: .install-stage
image: "before-install"
script:
- apt update
- apt-get update -o Acquire::Retries=3
- DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ./$YNH_BUILD_DIR/*.deb
- DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ./$YNH_BUILD_DIR/*.deb
- systemctl -q stop apt-daily.timer
- systemctl -q stop apt-daily-upgrade.timer

View file

@ -7,7 +7,7 @@
- systemctl -q disable apt-daily-upgrade.timer
- systemctl -q disable apt-daily.service
- systemctl -q disable apt-daily-upgrade.service
- apt update
- apt-get update -o Acquire::Retries=3
- DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ./$YNH_BUILD_DIR/*.deb
.test-stage:

View file

@ -100,7 +100,7 @@ ynh_package_version() {
# Requires YunoHost version 2.4.0.3 or higher.
ynh_apt() {
ynh_wait_dpkg_free
LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get --assume-yes --quiet -o=Dpkg::Use-Pty=0 $@
LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 $@
}
# Update package index files

View file

@ -416,7 +416,7 @@ def tools_update(apps=False, system=False):
# Update APT cache
# LC_ALL=C is here to make sure the results are in english
command = "LC_ALL=C apt update"
command = "LC_ALL=C apt-get update -o Acquire::Retries=3"
# Filter boring message about "apt not having a stable CLI interface"
# Also keep track of wether or not we encountered a warning...