Skip to content

Commit 600d28c

Browse files
pascaleberhard0seleimaohui
authored andcommitted
bitbake: fetch2: fix unpack of a single zstd file
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. (Bitbake rev: 5881ca0e0d53937cd25a57ff682a3b7577b0b7f8) Signed-off-by: Pascal Eberhard <[email protected]> Signed-off-by: Richard Purdie <[email protected]>
1 parent 22527a1 commit 600d28c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bitbake/lib/bb/fetch2/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,7 @@ def unpack(self, urldata, rootdir, data):
15181518
(file, urldata.parm.get('unpack')))
15191519

15201520
base, ext = os.path.splitext(file)
1521-
if ext in ['.gz', '.bz2', '.Z', '.xz', '.lz']:
1521+
if ext in ['.gz', '.bz2', '.Z', '.xz', '.lz', '.zst']:
15221522
efile = os.path.join(rootdir, os.path.basename(base))
15231523
else:
15241524
efile = file

0 commit comments

Comments
 (0)