diff --git a/lib/functions/logging/runners.sh b/lib/functions/logging/runners.sh index 8e5dbe78dd..925af27b0a 100644 --- a/lib/functions/logging/runners.sh +++ b/lib/functions/logging/runners.sh @@ -20,6 +20,10 @@ function chroot_sdcard_apt_get_install_dry_run() { chroot_sdcard_apt_get --no-install-recommends --dry-run install "$@" "${logging_filter}" } +function chroot_sdcard_apt_get_update() { + apt_logging="-q" chroot_sdcard_apt_get update +} + function chroot_sdcard_apt_get_remove() { DONT_MAINTAIN_APT_CACHE="yes" chroot_sdcard_apt_get remove "$@" } @@ -27,7 +31,7 @@ function chroot_sdcard_apt_get_remove() { function chroot_sdcard_apt_get() { acng_check_status_or_restart # make sure apt-cacher-ng is running OK. - local -a apt_params=("-y" "-qq") + local -a apt_params=("-y" "${apt_logging:-"-qq"}") # 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+=( diff --git a/lib/functions/rootfs/create-cache.sh b/lib/functions/rootfs/create-cache.sh index c3099170db..46a4fd6d52 100644 --- a/lib/functions/rootfs/create-cache.sh +++ b/lib/functions/rootfs/create-cache.sh @@ -191,7 +191,7 @@ function create_new_rootfs_cache() { # stage: update packages list display_alert "Updating package list" "$RELEASE" "info" - do_with_retries 3 chroot_sdcard_apt_get update + do_with_retries 3 chroot_sdcard_apt_get_update # stage: upgrade base packages from xxx-updates and xxx-backports repository branches display_alert "Upgrading base packages" "Armbian" "info" diff --git a/lib/functions/rootfs/distro-agnostic.sh b/lib/functions/rootfs/distro-agnostic.sh index f9f25cf970..1af06aca67 100644 --- a/lib/functions/rootfs/distro-agnostic.sh +++ b/lib/functions/rootfs/distro-agnostic.sh @@ -257,7 +257,7 @@ function install_distribution_agnostic() { fi display_alert "Updating" "apt package lists" - do_with_retries 3 chroot_sdcard_apt_get update + do_with_retries 3 chroot_sdcard_apt_get_update # install image packages; AGGREGATED_PACKAGES_IMAGE is produced by aggregation.py # and includes the old PACKAGE_LIST_BOARD and PACKAGE_LIST_FAMILY diff --git a/lib/functions/rootfs/rootfs-desktop.sh b/lib/functions/rootfs/rootfs-desktop.sh index 288a16759d..a337f01ff2 100644 --- a/lib/functions/rootfs/rootfs-desktop.sh +++ b/lib/functions/rootfs/rootfs-desktop.sh @@ -1,23 +1,24 @@ #!/usr/bin/env bash # a-kind-of-hook, called by install_distribution_agnostic() if it's a desktop build -desktop_postinstall() { +function desktop_postinstall() { # disable display manager for the first run disable_systemd_service_sdcard lightdm.service disable_systemd_service_sdcard gdm3.service - # update packages index - chroot_sdcard_apt_get "update" + # @TODO: why? + display_alert "Updating package lists" "for desktop" "info" + do_with_retries 3 chroot_sdcard_apt_get_update - # @TODO: rpardini: this is... missing from aggregation...? - # install per board packages + # @TODO: rpardini: this is... missing from aggregation...? it is used by 2 boards. + # install per board packages, desktop-only, packages. if [[ -n ${PACKAGE_LIST_DESKTOP_BOARD} ]]; then chroot_sdcard_apt_get_install "$PACKAGE_LIST_DESKTOP_BOARD" fi - # install per family packages - if [[ -n ${PACKAGE_LIST_DESKTOP_FAMILY} ]]; then + # install per family packages (desktop only) + if [[ -n ${PACKAGE_LIST_DESKTOP_FAMILY} ]]; then # @TODO: used by 0 boards chroot_sdcard_apt_get_install "$PACKAGE_LIST_DESKTOP_FAMILY" fi