Skip to content

feat: only update cache-file for installed apps - #1419

Merged
flexiondotorg merged 1 commit into
wimpysworld:mainfrom
silentJET85:update-cache-only-installed
Aug 18, 2025
Merged

flexiondotorg merged 1 commit into
wimpysworld:mainfrom
silentJET85:update-cache-only-installed

Conversation

@silentJET85

Copy link
Copy Markdown
Contributor

This PR will make it so that deb-get update will only update the cache file for apps that are already installed.
Unless I'm overlooking something, there doesn't seem to be any need to have the cache file for non-installed apps. When installing an app, it will still be downloaded if needed.

This should significantly reduce the amount that the Github API is being called for the average user, at least partially solving #757. As well as just speeding up the deb-get update process overall.

This should also have the side-benefit of reducing the errors shown for apps that are not installed, as mentioned in #964.

@GideonBear

Copy link
Copy Markdown
Contributor

Applied the patch on my system, no problems so far. Good idea!
One thing: it does hide errors for apps that are not installed, which could also hide the errors from maintainers; it's probably best to catch those errors early. Maybe we could set up a workflow to run daily that updates the cache for all packages (or maybe even installs all packages)?

@silentJET85

Copy link
Copy Markdown
Contributor Author

I've been tossing around the idea of making a local script to do something similar in virtual machines on a spare computer. Maybe even having a separate VM for each supported release (bookworm, trixie, jammy, noble, etc) and testing every package in each, to be thorough.

But the Github Workflow idea is probably better and less maintenance. My only worry would be about exceeding the allotted minutes if we install every package. (Not sure what tier they're on.) Although installing them all would be helpful in finding breakages early.

Perhaps just updating the cache daily, and doing full installs only weekly or monthly would be sufficient. Or something like that.

@GideonBear

GideonBear commented Apr 25, 2025 •

Copy link
Copy Markdown
Contributor

Agreed that it should do it on all supported releases, but unfortunately it doesn't look like GitHub Actions has them all, and I don't think it's a good idea to run it in containers, since packages might depend on things like graphical libraries, etc. to be available. nvm that doesn't make any sense I think. GitHub Actions is a container/vm itself. So it's probably possible.
Also note that installing the same version of a package twice is absolutely pointless (right?), so we should be able to cache the version that was last tested, and only test new versions of packages; we could probably run it daily if we do it that way.

@flexiondotorg
flexiondotorg merged commit 7c38ee1 into wimpysworld:main Aug 18, 2025
@silentJET85
silentJET85 deleted the update-cache-only-installed branch August 19, 2025 15:27
mvanhorn added a commit to mvanhorn/deb-get that referenced this pull request Apr 17, 2026
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
philclifford pushed a commit that referenced this pull request Apr 21, 2026
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
philclifford pushed a commit to philclifford/deb-get that referenced this pull request Jun 17, 2026
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
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.

3 participants