]> git.ipfire.org Git - pakfire.git/commitdiff
pakfire: Refresh repos once all have been created
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Jan 2025 15:56:37 +0000 (15:56 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Jan 2025 15:56:37 +0000 (15:56 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/pakfire.c
src/pakfire/repo.c

index 21bbc2e111209022c5e2ba51352ddedbc977155e..b9387c057bf4fadfe8e2508d6afb4572f2a18709 100644 (file)
@@ -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);
index 2b9d8d0769140c61525713ef6be55b754d187db4..d0f8cad5dd7ed31fe81d022e17d8b2a4db1a16bf 100644 (file)
@@ -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;
 }