]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
build: Do not perform BUILDROOT check on Python bytecode files
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 17 Mar 2023 15:00:51 +0000 (15:00 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 17 Mar 2023 15:00:51 +0000 (15:00 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/build.c

index d75140e40293987f673e0c92f9b80c077464f4f3..1f4f5093de183c94af824e1e7d0d889b11c8e612 100644 (file)
@@ -1176,6 +1176,15 @@ static int pakfire_build_post_check_buildroot(
                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)