db update requires own download logic for prefetch, previous logic caused check for updates to use old database and all databases were being updated before all repos were checked for cached pkgs

This commit is contained in:
2026-05-26 00:39:18 -06:00
parent ca5addd913
commit 76ca7567e5
4 changed files with 57 additions and 25 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ const (
)
type CacheClient interface {
FetchDB() error
FetchDB(repo string) error
Fetch(relpath string) (*cache.CacheFile, error)
}
@@ -53,7 +53,7 @@ func (r *RepoSync) Sync() error {
// call cache db fetch
slog.Info("refreshing databases")
if err := r.c.FetchDB(); err != nil {
if err := r.c.FetchDB(repo); err != nil {
return err
}