signature->pakfire = pakfire_ref(archive->pakfire);
signature->nrefs = 1;
signature->sigdata = strdup(sigdata);
-
- DEBUG(signature->pakfire, "Allocated archive signature at %p\n%s\n",
- signature, signature->sigdata);
}
return signature;
}
static void pakfire_archive_signature_free(PakfireArchiveSignature signature) {
- DEBUG(signature->pakfire, "Releasing archive signature at %p\n", signature);
pakfire_unref(signature->pakfire);
if (signature->key)
}
static void pakfire_archive_free(PakfireArchive archive) {
- DEBUG(archive->pakfire, "Releasing archive at %p\n", archive);
-
// Close the file
if (archive->f)
fclose(archive->f);
if (!a)
return ENOMEM;
- DEBUG(pakfire, "Allocated new archive at %p\n", archive);
-
a->pakfire = pakfire_ref(pakfire);
a->nrefs = 1;
}
static void pakfire_db_free(struct pakfire_db* db) {
- DEBUG(db->pakfire, "Releasing database at %p\n", db);
-
if (db->handle) {
// Optimize the database before it is being closed
pakfire_db_optimize(db);
if (!o)
return -ENOMEM;
- DEBUG(pakfire, "Allocated database at %p\n", o);
-
o->pakfire = pakfire_ref(pakfire);
o->nrefs = 1;
if (!pkg)
return NULL;
- DEBUG(pakfire, "Allocated Package at %p\n", pkg);
-
pkg->pakfire = pakfire_ref(pakfire);
pkg->id = id;
}
static void pakfire_package_free(PakfirePackage pkg) {
- DEBUG(pkg->pakfire, "Releasing Package at %p\n", pkg);
-
if (pkg->repo)
pakfire_repo_unref(pkg->repo);
}
static void pakfire_free(Pakfire pakfire) {
- DEBUG(pakfire, "Releasing Pakfire at %p\n", pakfire);
-
// umount everything
pakfire_umount(pakfire);
// Make namespace
pakfire_parser_set_namespace(parser, namespace);
-
- DEBUG(pakfire, "Allocated new parser at %p (%s, %p)\n",
- parser, parser->namespace, parser->parent);
}
return parser;
}
static void pakfire_parser_free(PakfireParser parser) {
- DEBUG(parser->pakfire, "Releasing parser at %p\n", parser);
-
// Release regular expressions
if (parser->regex_variable)
pcre2_code_free(parser->regex_variable);
PakfireProblem problem = calloc(1, sizeof(*problem));
if (problem) {
- DEBUG(pakfire, "Allocated Problem at %p\n", problem);
problem->pakfire = pakfire_ref(pakfire);
problem->nrefs = 1;
}
static void pakfire_problem_free(PakfireProblem problem) {
- DEBUG(problem->pakfire, "Releasing Problem at %p\n", problem);
-
pakfire_problem_unref(problem->next);
pakfire_request_unref(problem->request);
}
static void pakfire_repo_free(PakfireRepo repo, const int free_repo) {
- DEBUG(repo->pakfire, "Releasing Repo at %p\n", repo);
-
if (free_repo) {
free_repo_appdata(repo->repo->appdata);
repo_free(repo->repo, 0);
if (!repo)
return NULL;
- DEBUG(pakfire, "Allocated Repo at %p\n", repo);
-
repo->pakfire = pakfire_ref(pakfire);
repo->nrefs = 1;
if (!scriptlet)
return NULL;
- DEBUG(pakfire, "Allocated scriptlet at %p\n", scriptlet);
-
if (data && size) {
int r = pakfire_scriptlet_set(scriptlet, data, size);
if (r) {