"disable_tests",
NULL,
};
+ struct pakfire_build* build = NULL;
const char* path = NULL;
const char* target = NULL;
const char* build_id = NULL;
Py_BEGIN_ALLOW_THREADS
+ // Create a new build environment
+ r = pakfire_build_create(&build, self->pakfire, build_id, flags);
+ if (r)
+ goto ERROR;
+
+ // Set target
+ if (target) {
+ r = pakfire_build_set_target(build, target);
+ if (r)
+ goto ERROR;
+ }
+
// Run build
- r = pakfire_build(self->pakfire, path, target, build_id, flags);
+ r = pakfire_build_exec(build, path);
+
+ERROR:
+ if (build)
+ pakfire_build_unref(build);
Py_END_ALLOW_THREADS
return r;
}
-/*
- Compatibility function to keep the legacy API.
-*/
-PAKFIRE_EXPORT int pakfire_build(struct pakfire* pakfire, const char* path,
- const char* target, const char* id, int flags) {
- struct pakfire_build* build = NULL;
- int r;
-
- // Check if path is set
- if (!path) {
- errno = EINVAL;
- return 1;
- }
-
- // Create a new build environment
- r = pakfire_build_create(&build, pakfire, id, flags);
- if (r)
- goto ERROR;
-
- // Set target
- if (target) {
- r = pakfire_build_set_target(build, target);
- if (r)
- goto ERROR;
- }
-
- // Run build
- r = pakfire_build_exec(build, path);
-
-ERROR:
- if (build)
- pakfire_build_unref(build);
-
- return r;
-}
-
int pakfire_build_clean(struct pakfire* pakfire, int flags) {
struct pakfire_repo* local = NULL;
int r = 0;
int pakfire_build_exec(struct pakfire_build* build, const char* path);
-int pakfire_build(struct pakfire* pakfire, const char* path, const char* target,
- const char* id, int flags);
int pakfire_build_clean(struct pakfire* pakfire, int flags);
int pakfire_shell(struct pakfire* pakfire, const char** packages, int flags);
pakfire_archive_verify;
# build
- pakfire_build;
pakfire_build_create;
pakfire_build_exec;
pakfire_build_ref;