]> git.ipfire.org Git - pakfire.git/commitdiff
snapshots: Drop static list of excludes
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 20 May 2021 11:34:44 +0000 (11:34 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 20 May 2021 11:34:44 +0000 (11:34 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/snapshot.c

index e238890de89df1d83a1f03531e454e022f0aa801..1aec0436a88fadd9bc32be170f0d567bc15db7f0 100644 (file)
 #include <pakfire/types.h>
 #include <pakfire/util.h>
 
-static const char* pakfire_snapshot_excludes[] = {
-       "/dev",
-       "/proc",
-       "/run",
-       "/sys",
-       "/var/cache/ccache",
-       "/var/tmp",
-       NULL,
-};
-
-static int pakfire_snapshot_path_is_excluded(const char* path) {
-       for (const char** exclude = pakfire_snapshot_excludes; *exclude; exclude++) {
-               if (pakfire_string_startswith(path, *exclude))
-                       return 1;
-       }
-
-       // No match
-       return 0;
-}
-
 static int pakfire_snapshot_progressbar(
                struct pakfire_progressbar** progressbar, const char* message) {
        int r = pakfire_progressbar_create(progressbar, NULL);
@@ -178,12 +158,6 @@ PAKFIRE_EXPORT int pakfire_snapshot_create(Pakfire pakfire, FILE* f) {
                        continue;
                }
 
-               // Skip excludes
-               if (pakfire_snapshot_path_is_excluded(path)) {
-                       DEBUG(pakfire, "Skipping excluded path %s...\n", path);
-                       continue;
-               }
-
                archive_read_disk_descend(reader);
 
                // Reset path to relative path in archive