diff options
author | Mert Kirpici <smertk@gmail.com> | 2020-11-02 01:29:08 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-11-02 11:45:08 +0000 |
commit | 4348743a7e36f3a495e2dc48f83989d9481060f2 (patch) | |
tree | 03c1cf6f821939314323180fe86c84a600442b4c | |
parent | 7ae2b73d131491ab5bf09fd6055e1fdb67a560c6 (diff) | |
download | bitbake-4348743a7e36f3a495e2dc48f83989d9481060f2.tar.gz |
fetch2: add zstd support to unpack
This commit adds unpack support to fetched files with extensions:
'.tar.zst', '.tzst' and '.zst'
Signed-off-by: Mert Kirpici <mert.kirpici@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/fetch2/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index 551bfb70f..ca81bd522 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -1461,6 +1461,10 @@ class FetchMethod(object): cmd = '7z x -so %s | tar x --no-same-owner -f -' % file elif file.endswith('.7z'): cmd = '7za x -y %s 1>/dev/null' % file + elif file.endswith('.tzst') or file.endswith('.tar.zst'): + cmd = 'zstd --decompress --stdout %s | tar x --no-same-owner -f -' % file + elif file.endswith('.zst'): + cmd = 'zstd --decompress --stdout %s > %s' % (file, efile) elif file.endswith('.zip') or file.endswith('.jar'): try: dos = bb.utils.to_boolean(urldata.parm.get('dos'), False) |