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

feat(stability): add gentoo emerge retry #954

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
16 changes: 8 additions & 8 deletions nodebuilder
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ensure_curl_dependency() {
sudo dnf install --allowerasing --assumeyes curl > /dev/null
;;
gentoo)
emerge --jobs "$(nproc)" --load-average "$(($(nproc) + 1))" --quiet --quiet-build --quiet-fail net-misc/curl
emerge --jobs "$(nproc)" --load-average "$(($(nproc) + 1))" --retry 5 --quiet --quiet-build --quiet-fail net-misc/curl
;;
arch | endeavouros | garuda | manjaro)
sudo pacman -Syu --needed --noconfirm curl > /dev/null
Expand Down Expand Up @@ -107,7 +107,7 @@ ensure_sudo_dependency() {
;;
gentoo)
emerge --sync --quiet
emerge --jobs "$(nproc)" --load-average "$(($(nproc) + 1))" --quiet --quiet-build --quiet-fail app-admin/sudo
emerge --jobs "$(nproc)" --load-average "$(($(nproc) + 1))" --retry 5 --quiet --quiet-build --quiet-fail app-admin/sudo
;;
arch | endeavouros | garuda | manjaro)
pacman -Syu --needed --noconfirm sudo > /dev/null
Expand Down Expand Up @@ -264,12 +264,12 @@ install_build_dependencies_emerge() {
dependencies=$(curl --fail --silent --show-error --location --retry 5 "${BUILD_DEPENDENCIES_URL}")
[ -z "${dependencies:-}" ] && throw_error 'The list of dependencies is empty.'
if ! printf '%s\n' "${dependencies}" | xargs emerge --autounmask-write \
--jobs "$(nproc)" --load-average "$(($(nproc) + 1))" --quiet --quiet-build --quiet-fail; then
--jobs "$(nproc)" --load-average "$(($(nproc) + 1))" --retry 5 --quiet --quiet-build --quiet-fail; then
etc-update --automode -5
emerge --update --jobs "$(nproc)" --load-average "$(($(nproc) + 1))" --quiet --quiet-build --quiet-fail --deep --newuse @world
emerge --update --jobs "$(nproc)" --load-average "$(($(nproc) + 1))" --retry 5 --quiet --quiet-build --quiet-fail --deep --newuse @world
# Run the install command again
printf '%s\n' "${dependencies}" | xargs emerge --autounmask-write \
--jobs "$(nproc)" --load-average "$(($(nproc) + 1))" --quiet --quiet-build --quiet-fail
printf '%s\n' "${dependencies}" | xargs emerge --retry 5 --autounmask-write \
--jobs "$(nproc)" --load-average "$(($(nproc) + 1))" --retry 5 --quiet --quiet-build --quiet-fail
fi
}

Expand Down Expand Up @@ -369,7 +369,7 @@ install_runtime_dependencies_emerge() {
dependencies=$(torsocks curl --fail --silent --show-error --location --retry 2 "${RUNTIME_DEPENDENCIES_URL}") ||
dependencies=$(curl --fail --silent --show-error --location --retry 5 "${RUNTIME_DEPENDENCIES_URL}")
[ -z "${dependencies}" ] && throw_error 'The list of dependencies is empty.'
printf '%s\n' "${dependencies}" | xargs emerge --autounmask-write --jobs "$(nproc)" --load-average "$(($(nproc) + 1))" --quiet --quiet-build --quiet-fail
printf '%s\n' "${dependencies}" | xargs emerge --autounmask-write --jobs "$(nproc)" --load-average "$(($(nproc) + 1))" --retry 5 --quiet --quiet-build --quiet-fail
}

install_runtime_dependencies_pacman() {
Expand Down Expand Up @@ -423,7 +423,7 @@ install_system_updates_emerge() {
printf '\n'
[ -d "${GENTOO_EBUILD_REPOSITORY}" ] || mkdir -p "${GENTOO_EBUILD_REPOSITORY}"
emerge --depclean --quiet
emerge --update --jobs "$(nproc)" --load-average "$(($(nproc) + 1))" --quiet --quiet-build --quiet-fail --deep --newuse @world
emerge --update --jobs "$(nproc)" --load-average "$(($(nproc) + 1))" --retry 5 --quiet --quiet-build --quiet-fail --deep --newuse @world
emerge --depclean --quiet
}

Expand Down
Loading