From: Michael Tremer Date: Thu, 30 Jan 2025 09:12:16 +0000 (+0000) Subject: repo: Refactor finding the installed repository X-Git-Tag: 0.9.30~280 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dfefe7138a67795129e94805f38a606bc541f8d3;p=pakfire.git repo: Refactor finding the installed repository Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/repo.c b/src/pakfire/repo.c index 9d481d89..f40c64db 100644 --- a/src/pakfire/repo.c +++ b/src/pakfire/repo.c @@ -1203,16 +1203,8 @@ ERROR: return r; } -int pakfire_repo_is_installed_repo(struct pakfire_repo* repo) { - struct pakfire_repo* installed_repo = pakfire_get_installed_repo(repo->pakfire); - if (!installed_repo) - return 0; - - int r = pakfire_repo_identical(repo, installed_repo); - - pakfire_repo_unref(installed_repo); - - return (r == 0); +int pakfire_repo_is_installed_repo(struct pakfire_repo* self) { + return (self->repo == self->repo->pool->installed); } int pakfire_repo_download_package(struct pakfire_xfer** xfer,