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 12A49159C9B for ; Wed, 7 Aug 2024 17:39:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 70EB52BC05D; Wed, 7 Aug 2024 17:39:52 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 2CFBD2BC021 for ; Wed, 7 Aug 2024 17:39:52 +0000 (UTC) Message-ID: Subject: Re: [gentoo-dev] [PATCH 2/2] cargo.eclass: Preserve project-specific [build] flags by reading config From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: rust@gentoo.org, James Le Cuirot Date: Wed, 07 Aug 2024 19:39:46 +0200 In-Reply-To: <20240807160221.1035675-3-chewi@gentoo.org> References: <20240807160221.1035675-1-chewi@gentoo.org> <20240807160221.1035675-3-chewi@gentoo.org> Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-+cTQCGJIuinvRNTNjzau" User-Agent: Evolution 3.52.4 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: 0af05deb-0791-4182-acf3-aa8ab2757829 X-Archives-Hash: 7ad8f7a90e3e01e0df97c3db42a89a21 --=-+cTQCGJIuinvRNTNjzau Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2024-08-07 at 16:52 +0100, James Le Cuirot wrote: > The flags we set an a target-specific environment variable override any > generic [build] flags set by the project, requiring ebuilds to set these > themselves, which is undesirable. Work around this by using tomlq to > read the flags from the config files checked by Cargo and prepending > them to our environment variable. >=20 > Signed-off-by: James Le Cuirot > --- > eclass/cargo.eclass | 28 +++++++++++++++++----------- > 1 file changed, 17 insertions(+), 11 deletions(-) >=20 > diff --git a/eclass/cargo.eclass b/eclass/cargo.eclass > index 6d4cf1b425eb..dea8c49e4585 100644 > --- a/eclass/cargo.eclass > +++ b/eclass/cargo.eclass > @@ -36,7 +36,8 @@ esac > =20 > inherit flag-o-matic multiprocessing rust-toolchain toolchain-funcs > =20 > -[[ ! ${CARGO_OPTIONAL} ]] && BDEPEND=3D"${RUST_DEPEND}" > +# app-misc/yq is needed for tomlq. > +[[ ! ${CARGO_OPTIONAL} ]] && BDEPEND=3D"${RUST_DEPEND} app-misc/yq" > =20 Doesn't this imply that all ebuilds using CARGO_OPTIONAL will now have to explicitly depend on yq? --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-+cTQCGJIuinvRNTNjzau Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmazsWISHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQOAH0H/11/Wu5LQ/RQo3SdkVQTxuXFWY1AX1Sn EGW4WQV3yOHbmW52woPdsfFhcES3Gv0jgW1jmwPtbWC6X7VwPCPtSBWCXPBZXum/ 1FCOLIs2TgXli2MB+M2fBWnldpjRT9CmOgSAuxm99hlytXjEbgW2njsx4BR4lFSB ZB8yL6u+odnp45kSv01VFsDmtMGw516yHaBjq1zsVUfoRx1k7iGwY7Rs/2W3aHWw iaqSqv2ssWW3et9Dt7VUNI4BnlKrhK3yMxRuWG09zd76lUxfD9Y3kh9XVvoJ00Xp NH45wlNalUbQXWhUmVyYcCE1BR7c36gisQjK1VxggkKEQ9kdsHA/+48= =dRZa -----END PGP SIGNATURE----- --=-+cTQCGJIuinvRNTNjzau--