PAKFIRE_BUILD_ERROR_IF_NOT_EMPTY);
}
-/*
- BUILDROOT Check
-*/
-static int pakfire_build_post_check_buildroot(
- struct pakfire_build* build, struct pakfire_filelist* filelist) {
- const char* buildroot = pakfire_relpath(build->pakfire, build->buildroot);
-
- // Nested function to keep a reference to buildroot
- int __pakfire_build_post_check_buildroot(
- struct pakfire* pakfire, struct pakfire_file* file, void* data) {
- struct pakfire_filelist* matches = (struct pakfire_filelist*)data;
- int r;
-
- // Fetch the path
- const char* path = pakfire_file_get_path(file);
- if (!path)
- return 1;
-
- // Do not run this for Python bytecode files
- if (pakfire_path_match("**.pyc", path))
- return 0;
-
- if (pakfire_file_payload_matches(file, buildroot, strlen(buildroot))) {
- r = pakfire_filelist_add(matches, file);
- if (r)
- return r;
- }
-
- return 0;
- }
-
- return pakfire_build_post_process_files(
- build, filelist, "Files containing BUILDROOT:",
- __pakfire_build_post_check_buildroot, PAKFIRE_BUILD_ERROR_IF_NOT_EMPTY);
-}
-
/*
File Issues
*/
if (r)
goto ERROR;
- // Check for BUILDROOT
- r = pakfire_build_post_check_buildroot(build, filelist);
- if (r)
- goto ERROR;
-
// Check files
r = pakfire_build_post_check_files(build, filelist);
if (r)