struct pakfire* pakfire;
int nrefs;
+ Pool* pool;
+
// Reference to this package in the SOLV pool
Id id;
struct pakfire_repo* repo;
pkg->pakfire = pakfire_ref(pakfire);
pkg->nrefs = 1;
+ // Store a reference to the pool
+ pkg->pool = pakfire_get_solv_pool(pkg->pakfire);
+
// Store the ID
pkg->id = id;
goto ERROR;
for (int i = 0; i < q.count; i++) {
- dep = pakfire_dep2str(pkg->pakfire, q.elements[i]);
+ dep = pakfire_dep2str(pkg->ctx, pkg->pool, q.elements[i]);
if (!dep)
goto ERROR;
int pakfire_package_add_dep(struct pakfire_package* pkg,
const enum pakfire_package_key key, const char* dep) {
// Parse the dependency
- Id id = pakfire_str2dep(pkg->pakfire, dep);
+ Id id = pakfire_str2dep(pkg->ctx, pkg->pool, dep);
// Silently ignore any invalid dependencies
if (!id)
goto ERROR;
for (int i = 0; i < q.count; i++) {
- const char* dep = pakfire_dep2str(pkg->pakfire, q.elements[i]);
+ const char* dep = pakfire_dep2str(pkg->ctx, pkg->pool, q.elements[i]);
// Is this a rich dependency?
if (dep && *dep == '(') {
return r;
// Get the dependency
- Id depid = pakfire_str2dep(pkg->pakfire, dep);
+ Id depid = pakfire_str2dep(pkg->ctx, pkg->pool, dep);
if (!depid)
return -1;