aboutsummaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorCynede <cynede@gentoo.org>2018-11-16 15:06:44 +0400
committerCynede <cynede@gentoo.org>2018-11-16 15:06:44 +0400
commita9d61db860bf053a27794a9b985136180f76a7d5 (patch)
tree59f255e703c961749852e7cb4e522ef1aaae177a /eclass
parentresolve conflicts with tree versions (diff)
downloadrust-a9d61db860bf053a27794a9b985136180f76a7d5.tar.gz
rust-a9d61db860bf053a27794a9b985136180f76a7d5.tar.bz2
rust-a9d61db860bf053a27794a9b985136180f76a7d5.zip
rework CARGO_FETCH_CRATES, remove fetch-crates use flag, bump cargo
Diffstat (limited to 'eclass')
-rw-r--r--eclass/cargo.eclass15
1 files changed, 8 insertions, 7 deletions
diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 9e33c22..b6c6dde 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -15,7 +15,7 @@ _CARGO_ECLASS=1
CARGO_DEPEND=""
[[ ${CATEGORY}/${PN} != dev-util/cargo ]] && CARGO_DEPEND="virtual/cargo"
-: ${CARGO_IGNORE_FETCH_CRATES:=yes}
+: ${CARGO_FETCH_CRATES:=not}
case ${EAPI} in
5|6) : DEPEND="${DEPEND} ${CARGO_DEPEND}";;
@@ -27,7 +27,7 @@ inherit multiprocessing
EXPORT_FUNCTIONS src_unpack src_compile src_install
-IUSE="${IUSE} debug fetch-crates"
+IUSE="${IUSE} debug"
ECARGO_HOME="${WORKDIR}/cargo_home"
ECARGO_VENDOR="${ECARGO_HOME}/gentoo"
@@ -46,10 +46,10 @@ cargo_crate_uris() {
version="${name##*-}-${version}"
name="${name%-*}"
fi
- if [[ "${CARGO_IGNORE_FETCH_CRATES}" == "yes" ]]; then
+ if [[ "${CARGO_FETCH_CRATES}" == "not" ]]; then
url="https://crates.io/api/v1/crates/${name}/${version}/download -> ${crate}.crate"
else
- url="!fetch-crates? ( https://crates.io/api/v1/crates/${name}/${version}/download -> ${crate}.crate )"
+ url=""
fi
echo "${url}"
done
@@ -61,7 +61,7 @@ cargo_crate_uris() {
cargo_src_unpack() {
debug-print-function ${FUNCNAME} "$@"
- if use fetch-crates && [[ "${CARGO_IGNORE_FETCH_CRATES}" == "not" ]]; then
+ if [[ "${CARGO_FETCH_CRATES}" == "yes" ]]; then
# Cache crates in persistent store
# Do no redownload them at every compilation
ECARGO_HOME="${PORTAGE_ACTUAL_DISTDIR-${DISTDIR}}/cargo-src"
@@ -73,8 +73,9 @@ cargo_src_unpack() {
mkdir -p "${ECARGO_VENDOR}" || die
mkdir -p "${S}" || die
- if use fetch-crates && [[ "${CARGO_IGNORE_FETCH_CRATES}" == "not" ]]; then
- ewarn "USE=fetch-crates is set. Crates will be fetched from crates.io."
+ if [[ "${CARGO_FETCH_CRATES}" == "yes" ]]; then
+ default
+ ewarn "Crates will be fetched from crates.io."
return
fi