work around the Reverse=Provides: being emitted by the go binary

This commit is contained in:
Mahyar McDonald 2025-11-03 16:52:57 -08:00
parent 9a222f7e76
commit ac7844076b

17
lib.sh
View file

@ -105,17 +105,24 @@ function get_normalized_package_list {
# Remove commas, and block scalar folded backslashes, # Remove commas, and block scalar folded backslashes,
# extraneous spaces at the middle, beginning and end # extraneous spaces at the middle, beginning and end
# then sort. # then sort.
local packages=$(echo "${1}" \ local packages
packages=$(echo "${1}" \
| sed 's/[,\]/ /g; s/\s\+/ /g; s/^\s\+//g; s/\s\+$//g' \ | sed 's/[,\]/ /g; s/\s\+/ /g; s/^\s\+//g; s/\s\+$//g' \
| sort -t' ') | sort -t' ')
local script_dir="$(dirname -- "$(realpath -- "${0}")")" local script_dir
script_dir="$(dirname -- "$(realpath -- "${0}")")"
local architecture=$(dpkg --print-architecture) local architecture
architecture=$(dpkg --print-architecture)
local result
if [ "${architecture}" == "arm64" ]; then if [ "${architecture}" == "arm64" ]; then
${script_dir}/apt_query-arm64 normalized-list ${packages} result=$("${script_dir}/apt_query-arm64" normalized-list "${packages}")
else else
${script_dir}/apt_query-x86 normalized-list ${packages} result=$("${script_dir}/apt_query-x86" normalized-list "${packages}")
fi fi
# Remove "Reverse=Provides: " prefix from strings if present
echo "${result//Reverse=Provides: /}"
} }
############################################################################### ###############################################################################