return r;
}
-int pakfire_build_clean(pakfire_root* root, int flags) {
+int pakfire_build_clean(pakfire_ctx* ctx, pakfire_root* root, int flags) {
pakfire_repo* local = NULL;
int r = 0;
- pakfire_ctx* ctx = pakfire_root_get_ctx(root);
-
// Fetch local repository
local = pakfire_root_get_repo(root, PAKFIRE_REPO_LOCAL);
if (!local) {
ERROR:
if (local)
pakfire_repo_unref(local);
- if (ctx)
- pakfire_ctx_unref(ctx);
return r;
}
int pakfire_build_mkimage(pakfire_build* build,
const char* type, FILE* f);
-int pakfire_build_clean(pakfire_root* root, int flags);
+int pakfire_build_clean(pakfire_ctx* ctx, pakfire_root* root, int flags);
#endif /* PAKFIRE_BUILD_H */
return r;
// Clean build environments
- r = pakfire_build_clean(self, flags);
+ r = pakfire_build_clean(self->ctx, self, flags);
if (r)
return r;