scripts: dl_github_archive: fix zstd args passed to tar

The multi-word zstd option '-I zstd -T0 --ultra -20' was appended as a
single argv element. subprocess passes each list element as one argv
entry, so tar received the whole string as one argument and failed to
recognize it. Split into separate '-I' and 'zstd -T0 --ultra -20'
elements so tar correctly interprets the compressor command.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24375
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
This commit is contained in:
Rosen Penev 2026-07-04 20:30:11 -07:00 committed by Jonas Jelonek
parent 7ea374a4c7
commit dcf33fcbf5
No known key found for this signature in database

View file

@ -139,7 +139,7 @@ class Path(object):
if ts is not None: if ts is not None:
args.append('--mtime=@%d' % ts) args.append('--mtime=@%d' % ts)
if into.endswith('.zst'): if into.endswith('.zst'):
args.append('-I zstd -T0 --ultra -20') args += ['-I', 'zstd -T0 --ultra -20']
elif into.endswith('.xz'): elif into.endswith('.xz'):
envs['XZ_OPT'] = '-7e' envs['XZ_OPT'] = '-7e'
args.append('-J') args.append('-J')