]> git.ipfire.org Git - pakfire.git/commitdiff
pakfire: Remove the refresh function
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Jan 2025 16:02:43 +0000 (16:02 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 30 Jan 2025 16:02:43 +0000 (16:02 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/pakfire.c
src/pakfire/pakfire.h

index faea7b57f8daa7bb35f28200d7396665c8811b45..453b7abeb595283efd50a6f22aa16f11f9bda083 100644 (file)
@@ -625,6 +625,10 @@ ERROR:
        return r;
 }
 
+static int pakfire_refresh_repo(struct pakfire* pakfire, struct pakfire_repo* repo, void* data) {
+       return pakfire_repo_refresh(repo, 0);
+}
+
 const char* pakfire_get_distro_name(struct pakfire* pakfire) {
        if (*pakfire->distro.name)
                return pakfire->distro.name;
@@ -1071,7 +1075,7 @@ int pakfire_create(struct pakfire** pakfire, struct pakfire_ctx* ctx,
        }
 
        // Refresh repositories
-       r = pakfire_refresh(p, 0);
+       r = pakfire_repo_walk(p, pakfire_refresh_repo, NULL);
        if (r < 0)
                goto ERROR;
 
@@ -1268,17 +1272,6 @@ int pakfire_clean(struct pakfire* pakfire, int flags) {
        return pakfire_rmtree(PAKFIRE_CACHE_DIR, 0);
 }
 
-static int __pakfire_repo_refresh(struct pakfire* pakfire, struct pakfire_repo* repo,
-               void* p) {
-       int flags = *(int*)p;
-
-       return pakfire_repo_refresh(repo, flags);
-}
-
-int pakfire_refresh(struct pakfire* pakfire, int flags) {
-       return pakfire_repo_walk(pakfire, __pakfire_repo_refresh, &flags);
-}
-
 const char* pakfire_get_arch(struct pakfire* pakfire) {
        return pakfire->arches.nominal;
 }
index fa3d4831e9b8cfd3f03e918623410fec291511fa..e1be9aa76913121b0a3d58bd7c38e4dbcf28d3e3 100644 (file)
@@ -66,7 +66,6 @@ int pakfire_has_flag(struct pakfire* pakfire, const int flag);
 const char* pakfire_get_path(struct pakfire* pakfire);
 
 int pakfire_clean(struct pakfire* pakfire, int flags);
-int pakfire_refresh(struct pakfire* pakfire, int flags);
 
 const char* pakfire_get_arch(struct pakfire* pakfire);