ci: Properly clean up rustup

Use `rustup self uninstall -y` instead of manually removing folders to
ensure a proper cleanup of the rustup installation, including cargo and
init command injections in shell rc files.

Failing to do so can cause issues, such as bash failing to run in a `set
-e` environment due to a missing `$HOME/.cargo/env`, for example.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33519>
This commit is contained in:
Guilherme Gallo
2025-02-12 19:09:54 -03:00
committed by Marge Bot
parent e488b5e45e
commit a663f97d2d
3 changed files with 5 additions and 4 deletions

View File

@@ -220,7 +220,8 @@ uncollapsed_section_switch debian_cleanup "Cleaning up base Debian system"
apt-get purge -y "${EPHEMERAL[@]}"
rm -rf /root/.rustup
# Properly uninstall rustup including cargo and init scripts on shells
rustup self uninstall -y
. .gitlab-ci/container/container_post_build.sh

View File

@@ -59,8 +59,8 @@ export RUST_TARGET=x86_64-linux-android
. .gitlab-ci/container/build-rust.sh
. .gitlab-ci/container/build-deqp-runner.sh
rm -rf /root/.cargo
rm -rf /root/.rustup
# Properly uninstall rustup including cargo and init scripts on shells
rustup self uninstall -y
############### Build dEQP

View File

@@ -13,7 +13,7 @@
variables:
DEBIAN_X86_64_BUILD_BASE_IMAGE: "debian/x86_64_build-base"
DEBIAN_BASE_TAG: "20250204-arm32"
DEBIAN_BASE_TAG: "20250213-rustup"
DEBIAN_X86_64_BUILD_IMAGE_PATH: "debian/x86_64_build"
DEBIAN_BUILD_TAG: "20250210-android-drm"