ci/windows: Remove cargo-vendor sources from the cerbero source cache
authorNirbheek Chauhan <nirbheek@centricular.com>
Thu, 29 Sep 2022 14:00:05 +0000 (19:30 +0530)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 27 Jan 2023 04:12:40 +0000 (04:12 +0000)
Copying the source cache to a running Cerbero CI job on Windows causes
strange / corrupted errors that talk about hard links like:

++ cp -a C:/cerbero/cerbero-sources .
cp: will not create hard link `./cerbero-sources/gstreamer-1.0/subprojects/gst-plugins-good/sys/osxaudio' to directory `./cerbero-sources/cargo-c-0.9.12/cargo-vendor/adler/benches'
[...]

So, delete it. The vendored sources are cached by cargo in its own
cache inside CARGO_HOME, which is build/rust/cargo/ and is preserved
in the image. We won't need to redownload any of this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3821>

ci/docker/windows/prepare_cerbero_env.sh

index 21d55b8..eaaf87b 100644 (file)
@@ -23,5 +23,7 @@ echo 'vs_install_version = "vs16"' >> localconf.cbc
 
 # Wipe visualstudio package dist, sources, logs, and the build tools recipes
 ./cerbero-uninstalled -t -v visualstudio -c localconf.cbc -c config/win64.cbc wipe --force --build-tools
+# Vendored sources get confused with hard links
+rm -rvf /c/cerbero/cerbero-sources/*/cargo-vendor
 # clean the localconf
-rm /c/cerbero/localconf.cbc
+rm -v /c/cerbero/localconf.cbc