It is easier to run this when we read the database instead of in the
lower level SOLV reading function because inheriting the FILE handle
becomes difficult.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
goto ERROR;
}
+ // Automatically detect compression
+ f = pakfire_xfopen(f, "r");
+ if (!f) {
+ r = -errno;
+ goto ERROR;
+ }
+
// Drop any previous data
r = pakfire_repo_clear(repo);
if (r)
int pakfire_repo_read_solv(struct pakfire_repo* repo, FILE *f, int flags) {
int r;
- // Automatically detect compression
- f = pakfire_xfopen(f, "r");
- if (!f)
- return -errno;
-
// Import SOLV data
r = repo_add_solv(repo->repo, f, flags);