From: Michael Tremer Date: Thu, 30 Jan 2025 15:56:37 +0000 (+0000) Subject: pakfire: Refresh repos once all have been created X-Git-Tag: 0.9.30~254 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=191f960a2e9586ba21d611827d15e26ac15ca0d4;p=pakfire.git pakfire: Refresh repos once all have been created Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/pakfire.c b/src/pakfire/pakfire.c index 21bbc2e1..b9387c05 100644 --- a/src/pakfire/pakfire.c +++ b/src/pakfire/pakfire.c @@ -1077,6 +1077,11 @@ int pakfire_create(struct pakfire** pakfire, struct pakfire_ctx* ctx, goto ERROR; } + // Refresh repositories + r = pakfire_refresh(p, 0); + if (r < 0) + goto ERROR; + DEBUG(p->ctx, "Pakfire initialized at %p\n", p); DEBUG(p->ctx, " user = %s (%u)\n", p->user.name, p->user.uid); DEBUG(p->ctx, " group = %s (%u)\n", p->group.name, p->group.gid); diff --git a/src/pakfire/repo.c b/src/pakfire/repo.c index 2b9d8d07..d0f8cad5 100644 --- a/src/pakfire/repo.c +++ b/src/pakfire/repo.c @@ -405,11 +405,6 @@ int pakfire_repo_import(struct pakfire* pakfire, struct pakfire_config* config) if (r) return r; - // Refresh repositories - r = pakfire_refresh(pakfire, 0); - if (r) - return r; - return 0; }