From: Michael Tremer Date: Thu, 30 Jan 2025 16:02:43 +0000 (+0000) Subject: pakfire: Remove the refresh function X-Git-Tag: 0.9.30~251 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1c84fbc914c28b551986be2169fbe576127eea2b;p=pakfire.git pakfire: Remove the refresh function Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/pakfire.c b/src/pakfire/pakfire.c index faea7b57..453b7abe 100644 --- a/src/pakfire/pakfire.c +++ b/src/pakfire/pakfire.c @@ -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; } diff --git a/src/pakfire/pakfire.h b/src/pakfire/pakfire.h index fa3d4831..e1be9aa7 100644 --- a/src/pakfire/pakfire.h +++ b/src/pakfire/pakfire.h @@ -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);