]> git.ipfire.org Git - pakfire.git/commitdiff
_pakfire: Pass target for build()
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 3 Nov 2022 21:49:31 +0000 (21:49 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 3 Nov 2022 21:49:31 +0000 (21:49 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/_pakfire/pakfire.c

index 6ec1ce9ce2bfd5933b1c7aa5f07188b3979b8353..e2f67f37715e962bb7e1fc48ed747a69d0ab4a4a 100644 (file)
@@ -1111,6 +1111,7 @@ static PyObject* execute_return_value(int r) {
 static PyObject* Pakfire_build(PakfireObject* self, PyObject* args, PyObject* kwargs) {
        char* kwlist[] = {
                "path",
+               "target",
                "build_id",
                "disable_snapshot",
                "disable_ccache",
@@ -1119,13 +1120,14 @@ static PyObject* Pakfire_build(PakfireObject* self, PyObject* args, PyObject* kw
        };
 
        const char* path = NULL;
+       const char* target = NULL;
        const char* build_id = NULL;
        int disable_snapshot = 0;
        int disable_ccache = 0;
        int disable_tests = 0;
 
-       if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|zppp", kwlist, &path, &build_id,
-                       &disable_snapshot, &disable_ccache, &disable_tests))
+       if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|zzppp", kwlist, &path, &target,
+                       &build_id, &disable_snapshot, &disable_ccache, &disable_tests))
                return NULL;
 
        int flags = 0;
@@ -1143,7 +1145,7 @@ static PyObject* Pakfire_build(PakfireObject* self, PyObject* args, PyObject* kw
                flags |= PAKFIRE_BUILD_DISABLE_TESTS;
 
        // Run build
-       int r = pakfire_build(self->pakfire, path, NULL, build_id, flags);
+       int r = pakfire_build(self->pakfire, path, target, build_id, flags);
 
        return execute_return_value(r);
 }