Message ID | 20250708124711.3541367-1-martin.jansa@gmail.com |
---|---|
State | New |
Headers | show |
Series | fetch2: zstd: use --force to allow decompressing symlinks | expand |
On Tue, 8 Jul 2025 at 14:47, Martin Jansa via lists.openembedded.org <martin.jansa=gmail.com@lists.openembedded.org> wrote: > - cmd = 'zstd --decompress --stdout %s | %s -f -' % (file, tar_cmd) > + cmd = 'zstd --force --decompress --stdout %s | %s -f -' % (file, tar_cmd) > elif file.endswith('.zst'): > - cmd = 'zstd --decompress --stdout %s > %s' % (file, efile) > + cmd = 'zstd --force --decompress --stdout %s > %s' % (file, efile) • -f, --force: disable input and output checks. Allows overwriting existing files, input from console, output to stdout, operating on links, block devices, etc. During decompression and when the output destination is stdout, pass-through unrecognized formats as-is. I'm not sure using this --force option to fix this one particular issue is right. It will mask other problems that should stop the build at the decompression point. Alex
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index 0ad987c59..b3bf4d0b0 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -1547,9 +1547,9 @@ class FetchMethod(object): 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 | %s -f -' % (file, tar_cmd) + cmd = 'zstd --force --decompress --stdout %s | %s -f -' % (file, tar_cmd) elif file.endswith('.zst'): - cmd = 'zstd --decompress --stdout %s > %s' % (file, efile) + cmd = 'zstd --force --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)