commit:     e759d3dcff09e271735620b525333d091e085e2d
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  2 12:35:51 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Dec  9 18:16:16 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e759d3dc

cargo.eclass: Allow CRATES to be unset

Remove the assertion requiring CRATES to be set for non-live ebuilds.
There are valid use cases for ebuilds without CRATES, and the eclass
works just fine -- e.g. when the package is using GIT_CRATES only,
or when crates are provided via a tarball.

Closes: https://github.com/gentoo/gentoo/pull/34091
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 eclass/cargo.eclass | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass
index 70b6008d9cd8..1e1a6e3ddfe2 100644
--- a/eclass/cargo.eclass
+++ b/eclass/cargo.eclass
@@ -35,11 +35,6 @@ case ${EAPI} in
                # 1.52 may need setting RUSTC_BOOTSTRAP envvar for some crates
                # 1.53 added cargo update --offline, can be used to update 
vulnerable crates from pre-fetched registry without editing toml
                RUST_DEPEND=">=virtual/rust-1.53"
-
-               if [[ -z ${CRATES} && "${PV}" != *9999* ]]; then
-                       eerror "undefined CRATES variable in non-live EAPI=8 
ebuild"
-                       die "CRATES variable not defined"
-               fi
                ;;
 esac
 

Reply via email to