]> git.ipfire.org Git - pakfire.git/commitdiff
repo: Do not fail when solv file could not be read initially
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 20 Apr 2021 09:39:17 +0000 (09:39 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 20 Apr 2021 09:39:17 +0000 (09:39 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/repo.c

index 1ac629a39f167ca8fc49690775c79922fd2ed9a7..7d5a2038a5f4cc455878a5656cf7d6da75cbfca2 100644 (file)
@@ -257,12 +257,16 @@ static int pakfire_repo_read_metadata(PakfireRepo repo, const char* path, int re
                // Read database
                r = pakfire_repo_read_solv(repo, database_cache_path, 0);
                if (r) {
+                       if (!refresh && errno == ENOENT)
+                               goto NOERROR;
+
                        ERROR(repo->pakfire, "Could not read SOLV file %s: %s\n",
                                database_cache_path, strerror(errno));
                        goto ERROR;
                }
        }
 
+NOERROR:
        // Success
        r = 0;