]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
scripts: dl_github_archive: fix zstd args passed to tar 24375/head
authorRosen Penev <rosenp@gmail.com>
Sun, 5 Jul 2026 03:30:11 +0000 (20:30 -0700)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Tue, 28 Jul 2026 07:30:22 +0000 (09:30 +0200)
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>
scripts/dl_github_archive.py

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