]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
build: Bring back pattern matching which was accidentially dropped
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 16 Dec 2022 15:08:11 +0000 (15:08 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 16 Dec 2022 15:08:11 +0000 (15:08 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/build.c

index 93b8bf58a36be8ccc1caee8138fd3394e177cc28..53c26d75154039da733febc7335f426bbd1b8ce1 100644 (file)
@@ -295,11 +295,16 @@ static int pakfire_build_send_filelist(struct pakfire* pakfire, void* data, int
                goto ERROR;
        }
 
+       // Skip files if we are performing pattern matching
+       if (ctx->pattern && !pakfire_file_matches(file, ctx->pattern))
+               goto SKIP;
+
        // Write path to stdin
        r = dprintf(fd, "%s\n", path);
        if (r < 0)
                return r;
 
+SKIP:
        // Move on to the next file
        ctx->i++;