Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/
Date: Tue, 01 Jun 2021 22:20:16
Message-Id: 1622585989.3927c242bb4a54dba21c689dc15657c5c13490ae.gyakovlev@gentoo
1 commit: 3927c242bb4a54dba21c689dc15657c5c13490ae
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 1 22:19:16 2021 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 1 22:19:49 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3927c242
7
8 dev-lang/rust: make sysroot detection more robust
9
10 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
11
12 dev-lang/rust/rust-1.52.1.ebuild | 6 +++++-
13 1 file changed, 5 insertions(+), 1 deletion(-)
14
15 diff --git a/dev-lang/rust/rust-1.52.1.ebuild b/dev-lang/rust/rust-1.52.1.ebuild
16 index 42d6f2b17da..efa716a08b9 100644
17 --- a/dev-lang/rust/rust-1.52.1.ebuild
18 +++ b/dev-lang/rust/rust-1.52.1.ebuild
19 @@ -279,10 +279,14 @@ src_configure() {
20
21 local rust_stage0_root
22 if use system-bootstrap; then
23 - rust_stage0_root="$(rustc --print sysroot)"
24 + local printsysroot
25 + printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
26 + rust_stage0_root="${printsysroot}"
27 else
28 rust_stage0_root="${WORKDIR}"/rust-stage0
29 fi
30 + # in case of prefix it will be already prefixed, as --print sysroot returns full path
31 + [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
32
33 rust_target="$(rust_abi)"