}
// Write the repository
- r = pakfire_repo_compose(root, local_args.path, key, (const char**)local_args.packages);
+ r = pakfire_repo_compose(global_args->ctx, root,
+ local_args.path, key, (const char**)local_args.packages);
ERROR:
if (key)
return r;
}
-int pakfire_repo_compose(pakfire_root* root, const char* path,
- pakfire_key* key, const char** files) {
+int pakfire_repo_compose(pakfire_ctx* ctx, pakfire_root* root,
+ const char* path, pakfire_key* key, const char** files) {
pakfire_archive* archive = NULL;
pakfire_repo* repo = NULL;
char realpath[PATH_MAX];
return 1;
}
- // Fetch context
- pakfire_ctx* ctx = pakfire_root_get_ctx(root);
-
// XXX Check if the key is a secret key
size_t num_files = 0;
pakfire_repo_clear(repo);
pakfire_repo_unref(repo);
}
- if (ctx)
- pakfire_ctx_unref(ctx);
return r;
}
int pakfire_repo_write_metadata(pakfire_repo* repo, pakfire_key* key);
-int pakfire_repo_compose(pakfire_root* root, const char* path,
- pakfire_key* key, const char** files);
+int pakfire_repo_compose(pakfire_ctx* ctx, pakfire_root* root,
+ const char* path, pakfire_key* key, const char** files);
#define PAKFIRE_REPO_COMMANDLINE "@commandline"
#define PAKFIRE_REPO_DUMMY "@dummy"
files[num] = NULL;
// Create the repository
- return pakfire_repo_compose(transaction->root, path, key, files);
+ return pakfire_repo_compose(transaction->ctx, transaction->root, path, key, files);
}
Py_BEGIN_ALLOW_THREADS
- int r = pakfire_repo_compose(self->root, path, (key) ? key->key : NULL, files);
+ int r = pakfire_repo_compose(self->ctx->ctx, self->root,
+ path, (key) ? key->key : NULL, files);
if (r) {
Py_BLOCK_THREADS
PyErr_SetFromErrno(PyExc_OSError);
// Compose the repository
ASSERT_SUCCESS(
- pakfire_repo_compose(t->root, path, NULL, files)
+ pakfire_repo_compose(t->ctx, t->root, path, NULL, files)
);
// Everything passed