From: Michael Tremer Date: Wed, 26 Oct 2022 19:42:19 +0000 (+0000) Subject: packages: Internalize the pool when fetching numeric values X-Git-Tag: 0.9.28~200 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4ab9fd790ac88592dc450f2f631dda9b345d98f2;p=pakfire.git packages: Internalize the pool when fetching numeric values Signed-off-by: Michael Tremer --- diff --git a/src/libpakfire/package.c b/src/libpakfire/package.c index c36fa74e0..4b4e86035 100644 --- a/src/libpakfire/package.c +++ b/src/libpakfire/package.c @@ -709,6 +709,8 @@ PAKFIRE_EXPORT unsigned long long pakfire_package_get_num(struct pakfire_package Solvable* s = get_solvable(pkg); + pakfire_package_internalize_repo(pkg); + return solvable_lookup_num(s, id, notfound); } @@ -741,8 +743,12 @@ PAKFIRE_EXPORT int pakfire_package_set_num(struct pakfire_package* pkg, Solvable* s = get_solvable(pkg); + // Store the number solvable_set_num(s, id, num); + // Mark the package as changed + pakfire_package_has_changed(pkg); + return 0; }