From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 964A1158013 for ; Sat, 2 Dec 2023 12:37:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 833892BC01F; Sat, 2 Dec 2023 12:37:49 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 450BA2BC013 for ; Sat, 2 Dec 2023 12:37:49 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH] cargo.eclass: Allow CRATES to be unset Date: Sat, 2 Dec 2023 13:37:43 +0100 Message-ID: <20231202123743.236701-1-mgorny@gentoo.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: bf575b09-ae82-469b-bc62-94e0e78152af X-Archives-Hash: 2ed5be9112037ada9cbd904066cd3537 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 --- 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