1 |
Add support for .lz4 and .lzo formats that can be used for .tar.gpkg |
2 |
compression. |
3 |
|
4 |
Signed-off-by: Michał Górny <mgorny@g.o> |
5 |
--- |
6 |
eclass/tests/unpacker.sh | 7 +++++++ |
7 |
eclass/unpacker.eclass | 8 ++++++++ |
8 |
2 files changed, 15 insertions(+) |
9 |
|
10 |
diff --git a/eclass/tests/unpacker.sh b/eclass/tests/unpacker.sh |
11 |
index af979b0e2995..60b651759a52 100755 |
12 |
--- a/eclass/tests/unpacker.sh |
13 |
+++ b/eclass/tests/unpacker.sh |
14 |
@@ -165,6 +165,8 @@ test_compressed_file .lzma lzma |
15 |
test_compressed_file .xz xz |
16 |
test_compressed_file .lz lzip |
17 |
test_compressed_file .zst zstd |
18 |
+test_compressed_file .lz4 lz4 |
19 |
+test_compressed_file .lzo lzop |
20 |
|
21 |
test_compressed_file_multistream .bz2 bzip2 |
22 |
test_compressed_file_multistream .gz gzip |
23 |
@@ -187,6 +189,8 @@ test_compressed_tar .tar.xz xz |
24 |
test_compressed_tar .txz xz |
25 |
test_compressed_tar .tar.lz lzip |
26 |
test_compressed_tar .tar.zst zstd |
27 |
+test_compressed_tar .tar.lz4 lz4 |
28 |
+test_compressed_tar .tar.lzo lzop |
29 |
|
30 |
test_unpack test.cpio test.in cpio 'cpio -o --quiet <<<${TESTFILE} > ${archive}' |
31 |
test_compressed_cpio .cpio.bz2 bzip2 |
32 |
@@ -196,6 +200,8 @@ test_compressed_cpio .cpio.lzma lzma |
33 |
test_compressed_cpio .cpio.xz xz |
34 |
test_compressed_cpio .cpio.lz lzip |
35 |
test_compressed_cpio .cpio.zst zstd |
36 |
+test_compressed_cpio .cpio.lz4 lz4 |
37 |
+test_compressed_cpio .cpio.lzo lzop |
38 |
|
39 |
test_deb |
40 |
test_deb .gz gzip |
41 |
@@ -223,6 +229,7 @@ test_reject_junk .lz |
42 |
test_reject_junk .zst |
43 |
test_reject_junk .tar |
44 |
test_reject_junk .cpio |
45 |
+test_reject_junk .gpkg.tar |
46 |
test_reject_junk .deb |
47 |
test_reject_junk .zip |
48 |
test_reject_junk .7z |
49 |
diff --git a/eclass/unpacker.eclass b/eclass/unpacker.eclass |
50 |
index 8fb1c2abd1cf..a64c5eae18aa 100644 |
51 |
--- a/eclass/unpacker.eclass |
52 |
+++ b/eclass/unpacker.eclass |
53 |
@@ -401,6 +401,10 @@ _unpacker_get_decompressor() { |
54 |
echo "${UNPACKER_LZIP} -dc" ;; |
55 |
*.zst) |
56 |
echo "zstd -dc" ;; |
57 |
+ *.lz4) |
58 |
+ echo "lz4 -dc" ;; |
59 |
+ *.lzo) |
60 |
+ echo "lzop -dc" ;; |
61 |
esac |
62 |
} |
63 |
|
64 |
@@ -535,6 +539,10 @@ unpacker_src_uri_depends() { |
65 |
d="app-arch/zstd" ;; |
66 |
*.lha|*.lzh) |
67 |
d="app-arch/lha" ;; |
68 |
+ *.lz4) |
69 |
+ d="app-arch/lz4" ;; |
70 |
+ *.lzo) |
71 |
+ d="app-arch/lzop" ;; |
72 |
esac |
73 |
deps+=" ${d}" |
74 |
done |
75 |
-- |
76 |
2.37.3 |