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 169DD15838C for ; Tue, 23 Jan 2024 14:13:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DF7CAE2A51; Tue, 23 Jan 2024 14:13:49 +0000 (UTC) Received: from mx0.riseup.net (mx0.riseup.net [198.252.153.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 93FC1E2A32 for ; Tue, 23 Jan 2024 14:13:49 +0000 (UTC) Received: from fews02-sea.riseup.net (fews02-sea-pn.riseup.net [10.0.1.112]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx0.riseup.net (Postfix) with ESMTPS id 4TK8G458rHz9wrY for ; Tue, 23 Jan 2024 14:13:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1706019228; bh=2ULJcegCcq9rKASc+RpbVv8V/MHbElYjZNnKVfIHITU=; h=Date:From:To:Subject:In-Reply-To:References:From; b=QZzp8Xcj8hAQ9BVmtF5v/oU2fspx/zqP6hLaWnN6HWqKYtMtKRX2AywC1zUny8JFK AJtk2zyEPFvAds7dsihc1WD5yRqleXl1TVd27FNDkILmmO3PwWdAEK1FCUHVGAS1Jo ueTOIages84B4UAVaGLJ/iuEvv1+nu5r/BhoQIdU= X-Riseup-User-ID: 5028DA2AC64D86F821A536C417AAAC1E04A014E46BFBD6EF1DE6A1C1DA94F8E0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews02-sea.riseup.net (Postfix) with ESMTPSA id 4TK8G43gl3zFwLF for ; Tue, 23 Jan 2024 14:13:48 +0000 (UTC) Date: Tue, 23 Jan 2024 06:13:47 -0800 From: orbea To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH] cargo.eclass: add CARGO_TOML_DIR Message-ID: <20240123061347.20781a5d@Akita> In-Reply-To: References: <20240122161434.991554-1-sam@gentoo.org> <20240122193222.7d9a5b0e@Akita> 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: quoted-printable X-Archives-Salt: 9dc7b382-53e9-49b1-b8cd-8cb2ff8b96ca X-Archives-Hash: 4784caa300c6bede68d3856d365c51d4 On Tue, 23 Jan 2024 04:48:02 +0100 Micha=C5=82 G=C3=B3rny wrote: > On Mon, 2024-01-22 at 19:32 -0800, orbea wrote: > > This is required when cargo_live_src_unpack needs to be find a > > Cargo.toml file in a directory other than ${S} > >=20 > > Signed-off-by: orbea > > --- > > eclass/cargo.eclass | 11 ++++++++++- > > 1 file changed, 10 insertions(+), 1 deletion(-) > >=20 > > diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass > > index 3bdbb5e3ec64..692623382c56 100644 > > --- a/eclass/cargo.eclass > > +++ b/eclass/cargo.eclass > > @@ -116,6 +116,15 @@ ECARGO_VENDOR=3D"${ECARGO_HOME}/gentoo" > > # other src_functions of this eclass. > > # Note that cargo_gen_config is automatically called by > > cargo_src_unpack.=20 > > +# @ECLASS_VARIABLE: CARGO_TOML_DIR > > +# @DEFAULT_UNSET > > +# @DESCRIPTION: > > +# Optional variable containing the directory path to the > > Cargo.toml file. +# Should be defined before calling > > cargo_live_src_unpack. +# > > +# This is required for live ebuilds when Cargo.toml in a directory > > other +# than ${S}. > > + > > # @ECLASS_VARIABLE: myfeatures > > # @DEFAULT_UNSET > > # @DESCRIPTION: > > @@ -403,7 +412,7 @@ cargo_live_src_unpack() { > > umask "${EVCS_UMASK}" || die "Bad options to > > umask: ${EVCS_UMASK}" fi > > =20 > > - pushd "${S}" > /dev/null || die > > + pushd "${CARGO_TOML_DIR:-$S}" > /dev/null || die =20 >=20 > Please respect the current variable style. Sorry for being dense, but could you elaborate what you mean? >=20 > > =20 > > # Respect user settings before cargo_gen_config is called. > > if [[ ! ${CARGO_TERM_COLOR} ]]; then =20 >=20