• [gentoo-dev] [PATCH] cargo.eclass: Allow CRATES to be unset

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Sat Dec 2 13:40:02 2023
    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.

    Signed-off-by: Michał Górny <mgorny@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

    --
    2.43.0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)