commit: 3927c242bb4a54dba21c689dc15657c5c13490ae
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 1 22:19:16 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Jun 1 22:19:49 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3927c242
dev-lang/rust: make sysroot detection more robust
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
dev-lang/rust/rust-1.52.1.ebuild | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dev-lang/rust/rust-1.52.1.ebuild b/dev-lang/rust/rust-1.52.1.ebuild
index 42d6f2b17da..efa716a08b9 100644
--- a/dev-lang/rust/rust-1.52.1.ebuild
+++ b/dev-lang/rust/rust-1.52.1.ebuild
@@ -279,10 +279,14 @@ src_configure() {
local rust_stage0_root
if use system-bootstrap; then
- rust_stage0_root="$(rustc --print sysroot)"
+ local printsysroot
+ printsysroot="$(rustc --print sysroot || die "Can't determine
rust's sysroot")"
+ rust_stage0_root="${printsysroot}"
else
rust_stage0_root="${WORKDIR}"/rust-stage0
fi
+ # in case of prefix it will be already prefixed, as --print sysroot
returns full path
+ [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a
directory"
rust_target="$(rust_abi)"