Skip to content

Commit 8c50c3b

Browse files
mvanhornphilclifford
authored andcommitted
fix: populate release cache on 'show' for non-installed packages
Since #1419, get_github_releases, get_gitlab_releases, and get_website only refresh their cache files for 'install', 'fix-installed', or 'update' (the latter only when the package is installed). As a result, 'deb-get show <pkg>' on a non-installed package that uses one of those sources prints empty Published and Download lines — the per-package script reads the cache to derive URL and VERSION_PUBLISHED, but the cache was never fetched. Adding 'show' to the action allowlist keeps the 'no cache for apps we never install' intent in place (no change for list/prettylist/etc) while making sure 'show' returns a complete record for any supported package. Closes #1842
1 parent 02c6ea9 commit 8c50c3b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

deb-get

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ function get_github_releases() {
180180
# curl -I https://api.github.com/users/flexiondotorg
181181

182182
# Do not process github releases while generating a pretty list or upgrading
183-
if [[ ' install fix-installed ' =~ " ${ACTION} " ]] || { [[ ' update ' =~ " ${ACTION} " ]] && package_is_installed "${APP}"; }; then
183+
if [[ ' install fix-installed show ' =~ " ${ACTION} " ]] || { [[ ' update ' =~ " ${ACTION} " ]] && package_is_installed "${APP}"; }; then
184184
if [ ! -e "${CACHE_FILE}" ] || [ -n "$(find "${CACHE_FILE}" -mmin +"${DEBGET_CACHE_RTN:-60}")" ]; then
185185
if [ -z ${QUIET} ]; then
186186
fancy_message info "Updating ${CACHE_FILE}"
@@ -210,7 +210,7 @@ function get_gitlab_releases() {
210210
# So for gitlab sourced apps that use this release model users can use 99-local to pin a version
211211
#
212212

213-
if [[ ' install fix-installed ' =~ " ${ACTION} " ]] || { [[ ' update ' =~ " ${ACTION} " ]] && package_is_installed "${APP}"; }; then
213+
if [[ ' install fix-installed show ' =~ " ${ACTION} " ]] || { [[ ' update ' =~ " ${ACTION} " ]] && package_is_installed "${APP}"; }; then
214214
if [ ! -e "${CACHE_FILE}" ] || [ -n "$(find "${CACHE_FILE}" -mmin +"${DEBGET_CACHE_RTN:-60}")" ]; then
215215
if [ -z ${QUIET} ]; then
216216
fancy_message info "Updating ${CACHE_FILE}"
@@ -239,7 +239,7 @@ function get_gitlab_releases() {
239239
function get_website() {
240240
METHOD="website"
241241
CACHE_FILE="${CACHE_DIR}/${APP}.html"
242-
if [[ ' install fix-installed ' =~ " ${ACTION} " ]] || { [[ ' update ' =~ " ${ACTION} " ]] && package_is_installed "${APP}"; }; then
242+
if [[ ' install fix-installed show ' =~ " ${ACTION} " ]] || { [[ ' update ' =~ " ${ACTION} " ]] && package_is_installed "${APP}"; }; then
243243
if [ ! -e "${CACHE_FILE}" ] || [ -n "$(find "${CACHE_FILE}" -mmin +"${DEBGET_CACHE_RTN:-60}")" ]; then
244244
if [ -z ${QUIET} ]; then
245245
fancy_message info "Updating ${CACHE_FILE}"

0 commit comments

Comments
 (0)