From f34f67d610146cb95450719e17575a8e4f4c5695 Mon Sep 17 00:00:00 2001 From: Jakob Naucke Date: Fri, 15 Oct 2021 16:13:45 +0200 Subject: [PATCH] osbuilder: Specify version when installing Rust and update the script in `ci/` accordingly. When only parts of the Kata Containers repositories are checked out (e.g. when building with Snap) and no Rust version is provided in calling `install_rust.sh`, the scripts will attempt to clone the appropriate repos to read the version, which will fail because the directories already exist. Since we have read the version already, we can just specify it. Signed-off-by: Jakob Naucke --- ci/install_rust.sh | 2 +- tools/osbuilder/rootfs-builder/rootfs.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/install_rust.sh b/ci/install_rust.sh index 4e2def198d..d220ad5732 100755 --- a/ci/install_rust.sh +++ b/ci/install_rust.sh @@ -12,5 +12,5 @@ source "${cidir}/lib.sh" clone_tests_repo pushd ${tests_repo_dir} -.ci/install_rust.sh +.ci/install_rust.sh ${1:-} popd diff --git a/tools/osbuilder/rootfs-builder/rootfs.sh b/tools/osbuilder/rootfs-builder/rootfs.sh index 85055383fd..f56f43b3bf 100755 --- a/tools/osbuilder/rootfs-builder/rootfs.sh +++ b/tools/osbuilder/rootfs-builder/rootfs.sh @@ -552,7 +552,7 @@ EOT fi [ "$LIBC" == "musl" ] && bash ${script_dir}/../../../ci/install_musl.sh # rust agent needs ${arch}-unknown-linux-${LIBC} - rustup show | grep linux-${LIBC} > /dev/null || bash ${script_dir}/../../../ci/install_rust.sh + rustup show | grep linux-${LIBC} > /dev/null || bash ${script_dir}/../../../ci/install_rust.sh ${RUST_VERSION} test -r "${HOME}/.cargo/env" && source "${HOME}/.cargo/env" [ "$ARCH" == "aarch64" ] && OLD_PATH=$PATH && export PATH=$PATH:/usr/local/musl/bin