From 60440501bb2c210babf506a193dbc73ac7921a00 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Tue, 6 May 2025 01:16:45 +0200 Subject: [PATCH] Fix. --- bookworm/scripts/lib/apt_get_digested | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bookworm/scripts/lib/apt_get_digested b/bookworm/scripts/lib/apt_get_digested index 887a004..5f919b3 100644 --- a/bookworm/scripts/lib/apt_get_digested +++ b/bookworm/scripts/lib/apt_get_digested @@ -31,6 +31,7 @@ dpkg warns: unable to delete old directories (not empty):|dpkg: warning: unable update-alternatives: providing in auto mode:|update-alternatives: using ([[:print:]]+) to provide ([[:print:]]+) \(([[:print:]]+)\) in auto mode| [\1 → \2 (\3)]' _LAST_PREFIX='' +_STARTED_PRINTING= DEBIAN_FRONTEND=noninteractive apt-get -y $1 2>&1 | while read _LINE; do _LINE=$(printf '%s' "${_LINE}" | tr -d '\r') if [ -z "${_LINE}" ]; then @@ -56,16 +57,19 @@ DEBIAN_FRONTEND=noninteractive apt-get -y $1 2>&1 | while read _LINE; do if [ "${_COMPRESSED_ITEM}" = "IGNORE" ]; then continue elif [ -z "${_COMPRESSED_ITEM}" ]; then + test ! -z "${_STARTED_PRINTING}" && printf '\n' + printf '\r%s' "${_LINE}" _LAST_PREFIX='' - printf '\n\r%s' "${_LINE}" else if [ "${_PREFIX}" != "${_LAST_PREFIX}" ]; then - printf '\n\r' + test ! -z "${_STARTED_PRINTING}" && printf '\n' + printf '\r' prefixed_msg_no_nl "${_PREFIX}" _LAST_PREFIX="${_PREFIX}" fi printf ' %s' "${_COMPRESSED_ITEM}" fi + _STARTED_PRINTING=1 done printf '\r' -- 2.30.2