summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Julian Ospald <hasufell@posteo.de> 2017-08-24 19:09:11 +0200
committerAvatar Marc-Antoine Perennou <Marc-Antoine@Perennou.com> 2017-08-25 09:45:59 +0200
commit544f9ff7fba72eb2b7d69a99e2ac129808c52be9 (patch)
treeabb6a77ce7136011a8d13bca5146bfcfad635ca7
parentdc3fce68d3ea20889871755b6bef1d73405c4502 (diff)
downloadrust-544f9ff7fba72eb2b7d69a99e2ac129808c52be9.tar.gz
rust-544f9ff7fba72eb2b7d69a99e2ac129808c52be9.tar.xz
dev-lang/rust: fix build failure when repo has never been cloned
Also remove use of pkg_setup, because it is not essential and further breaks pbins, by trying to read $SCM_HOME from the build machine. Change-Id: If8124526976b5fe27fda160d00bc815e341be5e5 Reviewed-on: https://galileo.mailstation.de/gerrit/9917 Reviewed-by: Jenkins <wk@mailstation.de> Reviewed-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
-rw-r--r--packages/dev-lang/rust/rust-build.exlib18
1 files changed, 8 insertions, 10 deletions
diff --git a/packages/dev-lang/rust/rust-build.exlib b/packages/dev-lang/rust/rust-build.exlib
index bbce616..65030f8 100644
--- a/packages/dev-lang/rust/rust-build.exlib
+++ b/packages/dev-lang/rust/rust-build.exlib
@@ -15,7 +15,7 @@ exparam -v IMPORTANCE importance
require cargo alternatives
-export_exlib_phases pkg_preinst pkg_setup src_fetch_extra src_unpack src_prepare src_configure src_compile src_install
+export_exlib_phases pkg_preinst src_fetch_extra src_unpack src_prepare src_configure src_compile src_install
RUST_TARGET="$(exhost --target)"
RUST_TARGET="${RUST_TARGET/pc/unknown}"
@@ -64,9 +64,13 @@ rust-build_get_bootstrap_slot() {
local candidates=()
local s
- if ever is_scm && [[ -x /usr/host/bin/rustc-${SLOT}-$(scm_call revision) ]]; then
- echo ${SLOT}
- return
+ if ever is_scm ; then
+ # don't fail if repo has never been cloned or we are installing from pbin
+ local _rev=$(nonfatal scm_call revision)
+ if [[ -n ${_rev} ]] && [[ -x /usr/host/bin/rustc-${SLOT}-${_rev} ]]; then
+ echo ${SLOT}
+ return
+ fi
fi
[[ ${SLOT} == beta ]] && candidates+=(beta)
@@ -86,12 +90,6 @@ rust-build_has_build_deps() {
! option force-bootstrap && [[ -n ${s} ]]
}
-rust-build_pkg_setup() {
- if ! rust-build_has_build_deps; then
- einfo "Auto-bootstrapping ${PN}"
- fi
-}
-
rust-build_src_fetch_extra() {
if ! rust-build_has_build_deps; then
local old_path="${PATH}"