if (r) {
if (error)
pakfire_parser_error_unref(error);
+ else
+ ERROR(pakfire, "Could not read makefile: %m\n");
return r;
}
// The architecture is always "src"
r = pakfire_parser_set(makefile, NULL, "arch", "src", 0);
- if (r)
+ if (r) {
+ ERROR(pakfire, "Could not set architecture to 'src': %m\n");
goto ERROR;
+ }
// Get the package object
r = pakfire_parser_create_package(makefile, &pkg, NULL, NULL, "src");
// Create a new package object
r = pakfire_package_create(pkg, parser->pakfire, repo, name, evr, arch);
if (r) {
- ERROR(parser->pakfire, "Could not create package\n");
+ ERROR(parser->pakfire, "Could not create package: %m\n");
goto CLEANUP;
}
r = 0;
CLEANUP:
+ if (r)
+ ERROR(parser->pakfire, "Could not create package: %m\n");
+
if (name)
free(name);
if (evr)