From 870da8c0db941ac863b0ffcb4226d206794613f8 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 25 Aug 2025 16:24:51 +0200 Subject: [PATCH] Fix. --- trixie/scripts/minimize_installation.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/trixie/scripts/minimize_installation.sh b/trixie/scripts/minimize_installation.sh index 942bd1a..4025315 100755 --- a/trixie/scripts/minimize_installation.sh +++ b/trixie/scripts/minimize_installation.sh @@ -26,13 +26,14 @@ prefixed_msg_no_nl "collect packages deemed '${TOK_REQ}' by Debian: " dpkg-query -Wf '${Package} ${Priority}\n' | grep " ${TOK_REQ}" | cut -d' ' -f1 > "${PATH_LIST_UNSORTED}" sort "${PATH_LIST_UNSORTED}" > "${PATH_LIST_WHITE}" -prefixed_msg 'collect installed packages outside this selection …' +prefixed_msg '\ncollect installed packages outside this selection …' dpkg-query -Wf '${Package}\n' > "${PATH_LIST_UNSORTED}" sort "${PATH_LIST_UNSORTED}" > "${PATH_LIST_ALL_PACKAGES}" comm -3 "${PATH_LIST_ALL_PACKAGES}" "${PATH_LIST_WHITE}" > "${PATH_LIST_BLACK}" prefixed_msg 'apt-mark auto from diff …' -apt-mark auto < "${PATH_LIST_BLACK}" > /dev/null +BLACKLISTED=$(cat "${PATH_LIST_BLACK}") +apt-mark auto ${BLACKLISTED} > /dev/null rm "${PATH_LIST_UNSORTED}" "${PATH_LIST_ALL_PACKAGES}" "${PATH_LIST_WHITE}" "${PATH_LIST_BLACK}" prefixed_msg 'install or mark as manually installed packages from our own selections …' -- 2.30.2