From 4087e6bcf96fd9cf305412f5ed4e6d90f90b3487 Mon Sep 17 00:00:00 2001 From: Andrew Walsh Date: Wed, 20 Jul 2022 10:59:29 -0700 Subject: [PATCH 1/2] Fix cut regression. Originally fixed in #17. This was reintroduced when master was sync'd to staging. --- pre_cache_action.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pre_cache_action.sh b/pre_cache_action.sh index 7921adb..1917b2e 100755 --- a/pre_cache_action.sh +++ b/pre_cache_action.sh @@ -59,7 +59,7 @@ log "- Normalized package list is '${normalized_versioned_packages}'." value="${normalized_versioned_packages} @ ${version}" log "- Value to hash is '${value}'." -key="$(echo "${value}" | md5sum | /bin/cut -f1 -d' ')" +key="$(echo "${value}" | md5sum | cut -f1 -d' ')" log "- Value hashed as '${key}'." log "done." From 7d122843ce9917108227261652c6492f5661e1f3 Mon Sep 17 00:00:00 2001 From: Andrew Walsh Date: Sat, 23 Jul 2022 00:20:46 -0700 Subject: [PATCH 2/2] Switch to CLI safe apt command. Address concern in issue #23. --- lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib.sh b/lib.sh index 7c88180..4000bbe 100755 --- a/lib.sh +++ b/lib.sh @@ -22,7 +22,7 @@ function get_package_name_ver { IFS=\: read name ver <<< "${1}" # If version not found in the fully qualified package value. if test -z "${ver}"; then - ver="$(grep "Version:" <<< "$(apt show ${name})" | awk '{print $2}')" + ver="$(grep "Version:" <<< "$(apt-cache show ${name})" | awk '{print $2}')" fi echo "${name}" "${ver}" } @@ -35,4 +35,4 @@ function write_manifest { # 0:-1 to remove trailing comma, delimit by newline and sort echo "${2:0:-1}" | tr ',' '\n' | sort > ${3} log "done." -} \ No newline at end of file +}