From 89d6c686c666e3ad1dae252633f0dce628d77df2 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Thu, 26 Jan 2023 00:26:19 +0100 Subject: [PATCH] armbian-next: chroot_sdcard_apt_get_install_dry_run(): run again if first try fails, with more logging --- lib/functions/logging/runners.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/functions/logging/runners.sh b/lib/functions/logging/runners.sh index adc5b234e..f84c45985 100644 --- a/lib/functions/logging/runners.sh +++ b/lib/functions/logging/runners.sh @@ -17,7 +17,9 @@ function chroot_sdcard_apt_get_install_dry_run() { if [[ "${SHOW_DEBUG}" != "yes" ]]; then logging_filter="2>&1 | { grep --line-buffered -v -e '^Conf ' -e '^Inst ' || true; }" fi - chroot_sdcard_apt_get --no-install-recommends --dry-run install "$@" "${logging_filter}" + # do it twice if it fails once; second time with more logging (default is "-qq") + chroot_sdcard_apt_get --no-install-recommends --dry-run install "$@" "${logging_filter}" || + apt_logging="-q" chroot_sdcard_apt_get --no-install-recommends --dry-run install "$@" "${logging_filter}" } function chroot_sdcard_apt_get_update() {