}
static int Pakfire_init(PakfireObject* self, PyObject* args, PyObject* kwds) {
- const char* kwlist[] = { "ctx", "path", "arch", "config", NULL };
+ const char* kwlist[] = { "ctx", "path", "arch", "config", "stub", NULL };
struct pakfire_config* c = NULL;
const char* config = NULL;
const char* path = NULL;
const char* arch = NULL;
CtxObject* ctx = NULL;
+ int flags = 0;
+ int stub = 0;
int r;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!|zzz", (char**)kwlist,
- &CtxType, &ctx, &path, &arch, &config))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!|zzzb", (char**)kwlist,
+ &CtxType, &ctx, &path, &arch, &config, &stub))
return -1;
+ // Setup flags
+ if (stub)
+ flags |= PAKFIRE_FLAGS_STUB;
+
// Create a new configuration object
r = pakfire_config_create(&c);
if (r < 0) {
self->ctx = pakfire_ctx_ref(ctx->ctx);
// Create a new Pakfire instance
- r = pakfire_create(&self->pakfire, self->ctx, c, path, arch, 0);
+ r = pakfire_create(&self->pakfire, self->ctx, c, path, arch, flags);
Py_END_ALLOW_THREADS