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 59AF0159C9B for ; Thu, 8 Aug 2024 02:18:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 503E4E2C1B; Thu, 8 Aug 2024 02:17:59 +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 0F9B4E2C18 for ; Thu, 8 Aug 2024 02:17:59 +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 Date: Thu, 08 Aug 2024 04:17:53 +0200 In-Reply-To: <95535f7206f0ab02c70444e37c29dbcb073554f2.camel@gentoo.org> References: <20240807160221.1035675-1-chewi@gentoo.org> <20240807160221.1035675-3-chewi@gentoo.org> <95535f7206f0ab02c70444e37c29dbcb073554f2.camel@gentoo.org> Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-ItMKZbfToq8fW1jDOuIY" 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: a2a6079c-1748-4840-8465-370386f0463f X-Archives-Hash: 0d4b349d7b9969001ef3947999ab60f1 --=-ItMKZbfToq8fW1jDOuIY Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2024-08-07 at 21:19 +0100, James Le Cuirot wrote: > On Wed, 2024-08-07 at 19:39 +0200, Micha=C5=82 G=C3=B3rny wrote: > > On Wed, 2024-08-07 at 16:52 +0100, James Le Cuirot wrote: > > > The flags we set an a target-specific environment variable override a= ny > > > generic [build] flags set by the project, requiring ebuilds to set th= ese > > > 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 > >=20 > > Doesn't this imply that all ebuilds using CARGO_OPTIONAL will now have > > to explicitly depend on yq? >=20 > Good catch, thanks. I can update the eclass docs accordingly. I count 23 > ebuilds across 8 packages, and this can be done without a revbump, so it'= s not > too bad. Even if it were missing, it would just continue without applying > these extra flags. >=20 Still, this sounds like hardcoding implementation details into ebuilds, and implementation details can change over time. --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-ItMKZbfToq8fW1jDOuIY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAma0KtESHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQO864H/jXn4UVrkWH/aEicc1lB7bojFmZtNOzZ Plp7m1RX76uplsZsbGDUYNs9pxnm+LrE4tlokivu4A3+xKa3EVJfTahcr0JAnFxN 9zI71yEB1qoY+lCd+yoZs6fMc52BodsGkX1zLauNX5rToUdDedRt39PIhpp23k4n 8XsdfdbPfSiT4MpOCV24YrfwB7Nu7aaTjZnISImewXb7h55PH5ydQsQI8bUY87FL T1jE2MGfkjb9y/of/EBVoy91dTGUPeCIHGa1JPxDl0Yinx5R4vJErEg7Amju0V/I vAZMvhsPMVieeUcDpNlNhy4iUWyy28lyxYPDsVdImp1SuZdN0iC7dsA= =uZDE -----END PGP SIGNATURE----- --=-ItMKZbfToq8fW1jDOuIY--