@@ -1584,17 +1584,17 @@ class FetchMethod(object):
elif file.endswith('.tgz') or file.endswith('.tar.gz') or file.endswith('.tar.Z'):
cmd = tar_cmd + ['-z', '-f', file]
elif file.endswith('.tbz') or file.endswith('.tbz2') or file.endswith('.tar.bz2'):
- cmd = 'bzip2 -dc %s | %s -f -' % (file, shlex.join(tar_cmd))
+ cmd = tar_cmd + ['-j', '-f', file]
elif file.endswith('.gz') or file.endswith('.Z') or file.endswith('.z'):
cmd = 'gzip -dc %s > %s' % (file, efile)
elif file.endswith('.bz2'):
cmd = 'bzip2 -dc %s > %s' % (file, efile)
elif file.endswith('.txz') or file.endswith('.tar.xz'):
- cmd = 'xz -dc %s | %s -f -' % (file, shlex.join(tar_cmd))
+ cmd = tar_cmd + ['-J', '-f', file]
elif file.endswith('.xz'):
cmd = 'xz -dc %s > %s' % (file, efile)
elif file.endswith('.tar.lz'):
- cmd = 'lzip -dc %s | %s -f -' % (file, shlex.join(tar_cmd))
+ cmd = tar_cmd + ['--lzip', '-f', file]
elif file.endswith('.lz'):
cmd = 'lzip -dc %s > %s' % (file, efile)
elif file.endswith('.tar.7z'):
When originally implemented, tar didn't support many of the compression options so it was easier for the code to use pipelines. tar does support these now, so we can switch to using them. zstd isn't converted since the --zstd option isn't present in tar v1.30 present on RHEL 8 derived distros. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- lib/bb/fetch2/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)