diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2022-09-30 15:52:55 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2022-10-03 17:17:38 +0530 |
commit | db5cc4d82e8f5b2b67314288374e729ed4986cb3 (patch) | |
tree | be215601cfabe84fa0adad9fff8bca3a9ec9ddeb | |
parent | b5563d817bd635a9e5429dd6aa030f13872b1aad (diff) |
gen-cache: Fix tar usage on macOS and Windows
bsdtar and older GNU tar expect no further arguments after the -f
option.
0:00:03.006861 Generating cache file with ['tar', '-C', '/Users/gst-ci/builds/gstreamer/cerbero/cerbero-build', '--exclude=var/tmp', '-cf', '/Users/gst-ci/builds/gstreamer/cerbero/cerbero-build/cerbero-deps.tar.xz', 'build-tools', 'build-tools.cache', 'dist/darwin_universal', 'darwin_universal.cache', '--verbose', '--use-compress-program=xz --threads=0']
tar: --verbose: Cannot stat: No such file or directory
tar: --use-compress-program=xz --threads=0: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors.
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/950>
-rw-r--r-- | cerbero/commands/cache.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cerbero/commands/cache.py b/cerbero/commands/cache.py index e87d0ebb..bae11674 100644 --- a/cerbero/commands/cache.py +++ b/cerbero/commands/cache.py @@ -210,11 +210,6 @@ class GenCache(BaseCache): 'tar', '-C', config.home_dir, '--exclude=var/tmp', - '-cf', deps_filepath, - 'build-tools', - config.build_tools_cache, - os.path.join('dist', arch), - config.cache_file, '--verbose', ] # xz seems to hang sometimes while compressing on Windows CI @@ -222,6 +217,13 @@ class GenCache(BaseCache): cmd += ['--use-compress-program=xz --threads=0'] else: cmd += ['--bzip2'] + cmd += [ + '-cf', deps_filepath, + 'build-tools', + config.build_tools_cache, + os.path.join('dist', arch), + config.cache_file, + ] m.message(f'Generating cache file with {cmd!r}') try: shell.new_call(cmd) |