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 …'