From ee11f5dbd94e6ad897c2e884d71dd0497dc40213 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sun, 12 Mar 2023 18:30:53 -0300 Subject: [PATCH] chroot_sdcard_apt_get: don't use `-qq` for all apt operations on chroot if `SHOW_DEBUG=yes` (or `DEBUG=yes`) - helps debugging crazy upgrades happening due to @rpardini's stupid `Version: ` insanity --- lib/functions/logging/runners.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/functions/logging/runners.sh b/lib/functions/logging/runners.sh index 116c41ce32..a196f0733f 100644 --- a/lib/functions/logging/runners.sh +++ b/lib/functions/logging/runners.sh @@ -39,8 +39,12 @@ function chroot_sdcard_apt_get_remove() { function chroot_sdcard_apt_get() { acng_check_status_or_restart # make sure apt-cacher-ng is running OK. + declare default_apt_logging="-qq" + if [[ "${SHOW_DEBUG}" == "yes" ]]; then + default_apt_logging="" + fi - local -a apt_params=("-y" "${apt_logging:-"-qq"}") # super quiet by default, but can be tweaked up, for update for example + local -a apt_params=("-y" "${apt_logging:-"$default_apt_logging"}") # super quiet by default, but can be tweaked up, for update for example if [[ "${MANAGE_ACNG}" == "yes" ]]; then display_alert "Using managed apt-cacher-ng" "http://localhost:3142" "debug" apt_params+=(