From: Michael Tremer Date: Tue, 27 Apr 2021 11:34:33 +0000 (+0000) Subject: package: Remove function that returns a handle which is the ID X-Git-Tag: 0.9.28~1285^2~226 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94db84fcb7855053d9fdca053749026d54557cfe;p=pakfire.git package: Remove function that returns a handle which is the ID Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/package.c b/src/libpakfire/package.c index aabf7ef04..fb7a979d3 100644 --- a/src/libpakfire/package.c +++ b/src/libpakfire/package.c @@ -140,13 +140,6 @@ static Repo* pakfire_package_solv_repo(PakfirePackage pkg) { return s->repo; } -static Id pakfire_package_get_handle(PakfirePackage pkg) { - Pool* pool = pakfire_get_solv_pool(pkg->pakfire); - Solvable* s = get_solvable(pkg); - - return s - pool->solvables; -} - PAKFIRE_EXPORT int pakfire_package_identical(PakfirePackage pkg1, PakfirePackage pkg2) { return pkg1->id == pkg2->id; } @@ -1067,10 +1060,9 @@ static int pakfire_package_fetch_filelist(PakfirePackage pkg, PakfireFilelist fi Pool* pool = pakfire_get_solv_pool(pkg->pakfire); Repo* repo = pakfire_package_solv_repo(pkg); - Id handle = pakfire_package_get_handle(pkg); Dataiterator di; - dataiterator_init(&di, pool, repo, handle, + dataiterator_init(&di, pool, repo, pkg->id, SOLVABLE_FILELIST, NULL, SEARCH_FILES | SEARCH_COMPLETE_FILELIST); while (dataiterator_step(&di)) { @@ -1124,8 +1116,6 @@ static int pakfire_package_append_file(PakfirePackage pkg, const char* path) { Repodata* repodata = pakfire_repo_get_repodata(repo); pakfire_repo_unref(repo); - Id handle = pakfire_package_get_handle(pkg); - char* basename = pakfire_basename(path); char* dirname = pakfire_dirname(path); @@ -1135,7 +1125,7 @@ static int pakfire_package_append_file(PakfirePackage pkg, const char* path) { did = repodata_str2dir(repodata, "/", 1); // Add data to list - repodata_add_dirstr(repodata, handle, + repodata_add_dirstr(repodata, pkg->id, SOLVABLE_FILELIST, did, basename); free(basename);