From 41ea50dcc87dc62f55f42d31fdb1afe281f5b387 Mon Sep 17 00:00:00 2001 From: Mert Kirpici Date: Mon, 2 Nov 2020 01:29:08 +0300 Subject: bitbake: fetch2: add zstd support to unpack This commit adds unpack support to fetched files with extensions: '.tar.zst', '.tzst' and '.zst' (Bitbake rev: 4348743a7e36f3a495e2dc48f83989d9481060f2) Signed-off-by: Mert Kirpici Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bitbake') diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index 551bfb70f2..ca81bd5225 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/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) -- cgit v1.2.3-54-g00ecf