From 6d3c7590b1d0e03e4cbd50cafcec0287f2779301 Mon Sep 17 00:00:00 2001 From: awalsh128 Date: Thu, 23 Mar 2023 22:33:59 -0700 Subject: [PATCH] Test apt-cache show command wrt versioning. --- pre_cache_action.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pre_cache_action.sh b/pre_cache_action.sh index 326c3e9..2b48b54 100755 --- a/pre_cache_action.sh +++ b/pre_cache_action.sh @@ -56,9 +56,10 @@ log_empty_line versioned_packages="" log "Verifying packages..." for package in ${packages}; do - if test ! "$(apt-cache show ${package})"; then + package_name=$(echo ${package} | awk -F\= '{print $1}') + if test ! "$(apt-cache show ${package_name})"; then echo "aborted" - log "Package '${package}' not found." >&2 + log "Package '${package_name}' not found." >&2 exit 5 fi read package_name package_ver < <(get_package_name_ver "${package}")