Add support for .lz4 and .lzo formats that can be used for .tar.gpkg compression.
Signed-off-by: Michał Górny <mgo...@gentoo.org> --- eclass/tests/unpacker.sh | 7 +++++++ eclass/unpacker.eclass | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/eclass/tests/unpacker.sh b/eclass/tests/unpacker.sh index af979b0e2995..60b651759a52 100755 --- a/eclass/tests/unpacker.sh +++ b/eclass/tests/unpacker.sh @@ -165,6 +165,8 @@ test_compressed_file .lzma lzma test_compressed_file .xz xz test_compressed_file .lz lzip test_compressed_file .zst zstd +test_compressed_file .lz4 lz4 +test_compressed_file .lzo lzop test_compressed_file_multistream .bz2 bzip2 test_compressed_file_multistream .gz gzip @@ -187,6 +189,8 @@ test_compressed_tar .tar.xz xz test_compressed_tar .txz xz test_compressed_tar .tar.lz lzip test_compressed_tar .tar.zst zstd +test_compressed_tar .tar.lz4 lz4 +test_compressed_tar .tar.lzo lzop test_unpack test.cpio test.in cpio 'cpio -o --quiet <<<${TESTFILE} > ${archive}' test_compressed_cpio .cpio.bz2 bzip2 @@ -196,6 +200,8 @@ test_compressed_cpio .cpio.lzma lzma test_compressed_cpio .cpio.xz xz test_compressed_cpio .cpio.lz lzip test_compressed_cpio .cpio.zst zstd +test_compressed_cpio .cpio.lz4 lz4 +test_compressed_cpio .cpio.lzo lzop test_deb test_deb .gz gzip @@ -223,6 +229,7 @@ test_reject_junk .lz test_reject_junk .zst test_reject_junk .tar test_reject_junk .cpio +test_reject_junk .gpkg.tar test_reject_junk .deb test_reject_junk .zip test_reject_junk .7z diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass index 8fb1c2abd1cf..a64c5eae18aa 100644 --- a/eclass/unpacker.eclass +++ b/eclass/unpacker.eclass @@ -401,6 +401,10 @@ _unpacker_get_decompressor() { echo "${UNPACKER_LZIP} -dc" ;; *.zst) echo "zstd -dc" ;; + *.lz4) + echo "lz4 -dc" ;; + *.lzo) + echo "lzop -dc" ;; esac } @@ -535,6 +539,10 @@ unpacker_src_uri_depends() { d="app-arch/zstd" ;; *.lha|*.lzh) d="app-arch/lha" ;; + *.lz4) + d="app-arch/lz4" ;; + *.lzo) + d="app-arch/lzop" ;; esac deps+=" ${d}" done -- 2.37.3