]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
filelist: Always prefer excludes first, then includes
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 6 Dec 2022 12:30:06 +0000 (12:30 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 6 Dec 2022 12:30:06 +0000 (12:30 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/filelist.c

index e63a87f72302bd37eb75913ae27b19054d98eeaf..a3722f31a121f72211083167891ceb3c64bd1274 100644 (file)
@@ -264,15 +264,6 @@ int pakfire_filelist_scan(struct pakfire_filelist* list, const char* root,
                if (!path || !*path)
                        continue;
 
-               // Skip what is not included
-               if (includes && !pakfire_filelist_match_patterns(path, includes)) {
-                       DEBUG(list->pakfire, "Skipping %s...\n", path);
-
-                       // We do not mark the whole tree as to skip because some matches might
-                       // look for file extensions, etc.
-                       continue;
-               }
-
                // Skip excludes
                if (excludes && pakfire_filelist_match_patterns(path, excludes)) {
                        DEBUG(list->pakfire, "Skipping %s...\n", path);
@@ -284,6 +275,15 @@ int pakfire_filelist_scan(struct pakfire_filelist* list, const char* root,
                        continue;
                }
 
+               // Skip what is not included
+               if (includes && !pakfire_filelist_match_patterns(path, includes)) {
+                       DEBUG(list->pakfire, "Skipping %s...\n", path);
+
+                       // We do not mark the whole tree as to skip because some matches might
+                       // look for file extensions, etc.
+                       continue;
+               }
+
                DEBUG(list->pakfire, "Processing %s...\n", path);
 
                // Reset the file entry