fetch2: fix unpack of a single zstd file
PATCH 1/1 fetch2: fix unpack of a single zstd file
From: Pascal Eberhard <[email protected]>
do_unpack generates a 'Bitbake Fetcher Error: UnpackError' when uncompressing a single 'file.zst', zstd command line returns the error 'unexpected end of file', and the input file 'file.zst' becomes empty.
The command line is 'zstd --decompress --stdout file.zst > file.zst'. So the issue is that the input and output filenames are the same.
Fix the output filename when using zstd for a single file.
Signed-off-by Pascal Eberhard <[email protected]>
--- lib/bb/fetch2/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/fetch2/__init__.py +1 -1
@@ -1518,7 +1518,7 @@ class FetchMethod(object): (file, urldata.parm.get('unpack'))) base, ext = os.path.splitext(file) - if ext in ['.gz', '.bz2', '.Z', '.xz', '.lz']: + if ext in ['.gz', '.bz2', '.Z', '.xz', '.lz', '.zst']: efile = os.path.join(rootdir, os.path.basename(base)) else: efile = file
Signature · 1 line
2.43.0