mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Add -o Acquire::Retries=3 to fix some stupid issues happening sometimes
This commit is contained in:
parent
c8b06bd8aa
commit
03432349d7
4 changed files with 6 additions and 5 deletions
|
@ -16,7 +16,7 @@ upgrade:
|
||||||
extends: .install-stage
|
extends: .install-stage
|
||||||
image: "after-install"
|
image: "after-install"
|
||||||
script:
|
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
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,7 +24,8 @@ install-postinstall:
|
||||||
extends: .install-stage
|
extends: .install-stage
|
||||||
image: "before-install"
|
image: "before-install"
|
||||||
script:
|
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
|
- 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.timer
|
||||||
- systemctl -q stop apt-daily-upgrade.timer
|
- systemctl -q stop apt-daily-upgrade.timer
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
- systemctl -q disable apt-daily-upgrade.timer
|
- systemctl -q disable apt-daily-upgrade.timer
|
||||||
- systemctl -q disable apt-daily.service
|
- systemctl -q disable apt-daily.service
|
||||||
- systemctl -q disable apt-daily-upgrade.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
|
- DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ./$YNH_BUILD_DIR/*.deb
|
||||||
|
|
||||||
.test-stage:
|
.test-stage:
|
||||||
|
|
|
@ -100,7 +100,7 @@ ynh_package_version() {
|
||||||
# Requires YunoHost version 2.4.0.3 or higher.
|
# Requires YunoHost version 2.4.0.3 or higher.
|
||||||
ynh_apt() {
|
ynh_apt() {
|
||||||
ynh_wait_dpkg_free
|
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
|
# Update package index files
|
||||||
|
|
|
@ -416,7 +416,7 @@ def tools_update(apps=False, system=False):
|
||||||
|
|
||||||
# Update APT cache
|
# Update APT cache
|
||||||
# LC_ALL=C is here to make sure the results are in english
|
# 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"
|
# Filter boring message about "apt not having a stable CLI interface"
|
||||||
# Also keep track of wether or not we encountered a warning...
|
# Also keep track of wether or not we encountered a warning...
|
||||||
|
|
Loading…
Add table
Reference in a new issue