From f10642c82beacd8f04d21d9f8116796d74bdc087 Mon Sep 17 00:00:00 2001 From: Jakob Naucke Date: Wed, 22 Dec 2021 19:06:26 +0100 Subject: [PATCH] osbuilder: Source .cargo/env before checking Rust We install Rust in the build containers, but we also install Rust in `rootfs.sh` if it is missing. It makes sense to install Rust in the build containers so it does not have to be installed every time, but for that check to work on non-login shells, we should source `.cargo/env` before running it. Signed-off-by: Jakob Naucke --- tools/osbuilder/rootfs-builder/rootfs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/osbuilder/rootfs-builder/rootfs.sh b/tools/osbuilder/rootfs-builder/rootfs.sh index 20c14b2e8..b13dc3cbc 100755 --- a/tools/osbuilder/rootfs-builder/rootfs.sh +++ b/tools/osbuilder/rootfs-builder/rootfs.sh @@ -554,6 +554,7 @@ EOT echo "WARNING: Forcing LIBC=gnu because $ARCH has no musl Rust target" fi [ "$LIBC" == "musl" ] && bash ${script_dir}/../../../ci/install_musl.sh + test -r "${HOME}/.cargo/env" && source "${HOME}/.cargo/env" # rust agent needs ${arch}-unknown-linux-${LIBC} if ! (rustup show | grep -v linux-${LIBC} > /dev/null); then if [ "$RUST_VERSION" == "null" ]; then