]> git.ipfire.org Git - pakfire.git/commitdiff
repo: Force refresh if we have no metadata
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 4 Feb 2025 14:56:51 +0000 (14:56 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 4 Feb 2025 14:56:51 +0000 (14:56 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/repo.c

index 6af4de8b86ea047fc43f5adac28ee053ee3e75a3..7ccdffa9e541cef2b00ad709b2de6c6895c16368 100644 (file)
@@ -1254,6 +1254,10 @@ static int pakfire_repo_download_metadata(struct pakfire_repo* repo, const char*
        if (pakfire_ctx_has_flag(repo->ctx, PAKFIRE_CTX_OFFLINE))
                return 0;
 
+       // If metadata is empty, we always refresh
+       if (!repo->appdata->repomd.version && !repo->appdata->repomd.revision)
+               force = 1;
+
        // Fetch refresh interval
        time_t refresh = repo->appdata->refresh;