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 3212715838C for ; Tue, 23 Jan 2024 03:48:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 435D9E2A32; Tue, 23 Jan 2024 03:48:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 F0D94E2A27 for ; Tue, 23 Jan 2024 03:48:06 +0000 (UTC) Message-ID: Subject: Re: [gentoo-dev] [PATCH] cargo.eclass: add CARGO_TOML_DIR From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Date: Tue, 23 Jan 2024 04:48:02 +0100 In-Reply-To: <20240122193222.7d9a5b0e@Akita> References: <20240122161434.991554-1-sam@gentoo.org> <20240122193222.7d9a5b0e@Akita> Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-IWKkX2lS84KlIYESmIiT" User-Agent: Evolution 3.50.3 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 X-Archives-Salt: a012e2d5-0dac-4a3d-a4f5-345323b3d171 X-Archives-Hash: 51bb1544fdfef60beee3ce5857051d38 --=-IWKkX2lS84KlIYESmIiT Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Please respect the current variable style. > =20 > # Respect user settings before cargo_gen_config is called. > if [[ ! ${CARGO_TERM_COLOR} ]]; then --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-IWKkX2lS84KlIYESmIiT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmWvNvISHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQOGooH+wdisUVBnGCK1uLQpfySjvFSngawXLIn RncEyIDU9+yfGz8dAU4xpRtxnPvSynMikOj76Sd840Rg2u8xUQTLcIP0TmuXtBm1 Uv14MuUKyVkaatWXD4nwt8sVFkotEfGxucNTWGRPk4D5KcG9TvF056JN8uEGZE14 VG2lozuPqgRW6NzM/Jrm2Ym1uU368QuuLdHBGWQo9eL/JU8se2BShuBAkMys28rR UL0ZDGn8eOFZGnk6XS36xbBeYIrp7n7kr7agrxtYcf1rI0VflLswrmj4vcLRq+us xv3aSs6eVB8daDEcCxahUQOfJkCcNjBW692Ea5qt2NhZtrzO3eWNOfA= =ZdS+ -----END PGP SIGNATURE----- --=-IWKkX2lS84KlIYESmIiT--