Skip to content

Fix gen-cache on post-merge CI *again*

Confirmed to pass CI at: https://gitlab.freedesktop.org/nirbheek/cerbero/-/pipelines/702123 https://gitlab.freedesktop.org/nirbheek/cerbero/-/pipelines/702549

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.
gen-cache: Use tarfile + xz on Windows

It seems tar + bzip2 *also* hangs sometimes on the Windows CI:

https://gitlab.freedesktop.org/nirbheek/cerbero/-/jobs/29258182

https://gitlab.freedesktop.org/nirbheek/cerbero/-/jobs/29258183

So use tarfile to generate the tarball and then use xz to compress it.
Hopefully this will not hang...
cerbero: Fix os.path.relpath on Windows

os.path.relpath was broken because we were monkey-patching
os.path.abspath. We need to revert it to the original implementation
when invoking os.path.relpath.
Edited by Nirbheek Chauhan

Merge request reports