Skip to content

fix: populate release cache on 'show' for non-installed packages#1848

Merged
philclifford merged 1 commit intowimpysworld:mainfrom
mvanhorn:osc/1842-show-fetch-cache
Apr 21, 2026
Merged

fix: populate release cache on 'show' for non-installed packages#1848
philclifford merged 1 commit intowimpysworld:mainfrom
mvanhorn:osc/1842-show-fetch-cache

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

Closes #1842

Problem

deb-get show <pkg> prints empty Published: and Download: lines when the package is not installed and uses get_github_releases, get_gitlab_releases, or get_website:

jet@debian13:~$ deb-get show gb-studio
  [*] WARNING! Cached file /var/cache/deb-get/gb-studio.json_extract is empty or missing.
GB Studio
  Package:      gb-studio
  Repository:   01-main
  Updater:      deb-get
  Installed:    No
  Published:
  Architecture: amd64 arm64
  Download:
  Website:      https://www.gbstudio.dev/
  Summary:      ...

Per-package scripts like 01-main/packages/gb-studio derive URL and VERSION_PUBLISHED by reading ${CACHE_FILE}, but since #1419 the cache is only populated for install, fix-installed, and update (the latter only when the package is already installed). show was not in that allowlist, so for non-installed packages the cache file never existed, the grep in the package definition returned nothing, and the two lines came out blank.

Fix

Add show to the action allowlist in get_github_releases, get_gitlab_releases, and get_website. The existing "no cache for apps we never install" guarantee (no fetching during list, prettylist, csvlist, search, etc.) is preserved.

Testing

  • bash -n deb-get passes
  • The three helpers are the only places where cache population is gated by ${ACTION}; the same pattern is applied consistently across all three

Scope notes

  • No change for list, prettylist, csvlist, search, remove, purge — cache is still not fetched during those actions
  • No change for packages that use direct sources — they do not depend on the cache file
  • Per-hour cache reuse (DEBGET_CACHE_RTN) still applies, so repeated show calls won't hammer GitHub / GitLab APIs

Since wimpysworld#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 wimpysworld#1842
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Trivial fix adding 'show' to an allowlist for metadata cache population, resolving a UI issue with empty fields for non-installed packages.

@philclifford philclifford merged commit 8c50c3b into wimpysworld:main Apr 21, 2026
2 checks passed
@mvanhorn
Copy link
Copy Markdown
Contributor Author

Thanks for the merge, @philclifford. Caching on show makes the UX a lot snappier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: "deb-get show" missing info for non-installed packages

2 participants