]> git.ipfire.org Git - pakfire.git/commitdiff
archive: Allow for the archive to be compressed
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 23 Aug 2022 15:27:32 +0000 (15:27 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 23 Aug 2022 15:27:32 +0000 (15:27 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/archive.c

index 6cf8e944ed4724575b7fa1446d2e817cf47a164d..51ac49fdac4064305fed9c72f0ebf397d046ffa3 100644 (file)
@@ -126,9 +126,13 @@ static int open_archive(struct pakfire_archive* archive, struct archive** a) {
        if (!*a)
                return ENOMEM;
 
-       // All packages must be uncompressed tar balls
+       // Archives must be uncompressed tarballs
        archive_read_support_format_tar(*a);
 
+       // Archives are either compressed using XZ or Zstandard
+       archive_read_support_filter_xz(*a);
+       archive_read_support_filter_zstd(*a);
+
        // Try opening the archive file
        int r = archive_read_open_FILE(*a, archive->f);
        if (r) {