return r;
}
+static int pakfire_build_lint_package(
+ struct pakfire_ctx* ctx, struct pakfire_package* pkg, void* data) {
+ struct pakfire_archive* archive = NULL;
+ int r;
+
+ // Fetch the archive
+ archive = pakfire_package_get_archive(pkg);
+ if (!archive) {
+ r = -errno;
+ goto ERROR;
+ }
+
+ // Run the linter
+ r = pakfire_archive_lint(archive, NULL, NULL);
+ if (r < 0)
+ goto ERROR;
+
+ERROR:
+ if (archive)
+ pakfire_archive_unref(archive);
+
+ return r;
+}
+
+static int pakfire_build_lint(struct pakfire_build* build) {
+ return pakfire_packagelist_walk(build->packages, pakfire_build_lint_package, build);
+}
+
PAKFIRE_EXPORT int pakfire_build_exec(struct pakfire_build* build, const char* path) {
struct pakfire_package* package = NULL;
struct pakfire_parser* makefile = NULL;
if (r)
goto ERROR;
+ // Lint the packages
+ r = pakfire_build_lint(build);
+ if (r < 0)
+ goto ERROR;
+
// Copy packages to their destination
r = pakfire_build_copy_packages(build);
if (r)