struct pakfire_package* package = NULL;
struct pakfire_parser* makefile = NULL;
char* buildroot = NULL;
+ char* problems = NULL;
char duration[TIME_STRING_MAX];
int r;
goto ERROR;
}
+ // Perform an install check to see whether we can build this at all
+ r = pakfire_package_installcheck(package, &problems, 0);
+ if (r) {
+ ERROR(build->pakfire, "Cannot build %s:\n%s\n", nevra, problems);
+ goto ERROR;
+ }
+
// Initialize the build environment
r = pakfire_build_init(build);
if (r)
pakfire_parser_unref(makefile);
if (package)
pakfire_package_unref(package);
+ if (problems)
+ free(problems);
// Cleanup buildroot
if (buildroot)