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 (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B669D1581F3 for ; Tue, 3 Dec 2024 13:26:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 95967E07F6; Tue, 3 Dec 2024 13:26:54 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 545E5E079C for ; Tue, 3 Dec 2024 13:26:53 +0000 (UTC) Message-ID: <2d6823930bf7b81f235f326d7a40482275ef7b6e.camel@gentoo.org> Subject: Re: [gentoo-dev] [PATCH] rust.eclass: add ERUST_{SLOT,TYPE} user variables From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: Matt Jolly Date: Tue, 03 Dec 2024 14:26:47 +0100 In-Reply-To: <20241203122236.1592666-2-kangie@gentoo.org> References: <20241203122236.1592666-2-kangie@gentoo.org> Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-OfQMO1ajJYU99bCPMSTx" 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: b48686e3-c9cd-4471-a507-d98068b0ab3e X-Archives-Hash: 08be8478b1ac31fcdf96bbcfea77028a --=-OfQMO1ajJYU99bCPMSTx Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2024-12-03 at 22:22 +1000, kangie@gentoo.org wrote: > From: Matt Jolly >=20 > These variables enable users (though most likely Gentoo developers) > to override the selection of the Rust implementation by the eclass. >=20 > This means that _only_ the specified ERUST_SLOT and/or ERUST_TYPE > ('source' or 'binary') will be checked for, with the eclass `die`ing > with "No Rust slot satisfying the package's dependencies..." if the > selected impl is not available. >=20 > These variables are intended to enable reproducing bugs and testing > packages against specific dev-lang/rust{,-bin} packages; they must > not be set in ebuilds. >=20 > Closes: https://bugs.gentoo.org/945752 > Signed-off-by: Matt Jolly > --- > eclass/rust.eclass | 49 +++++++++++++++++++++++++++++++++++++++++----- > 1 file changed, 44 insertions(+), 5 deletions(-) >=20 > diff --git a/eclass/rust.eclass b/eclass/rust.eclass > index 71cbb4b24f8c..991a9cdb7f14 100644 > --- a/eclass/rust.eclass > +++ b/eclass/rust.eclass > @@ -98,6 +98,26 @@ declare -a -g -r _RUST_SLOTS_ORDERED=3D( > "1.54.0" > ) > =20 > +# =3D=3D user control knobs =3D=3D > + > +# @ECLASS_VARIABLE: ERUST_SLOT > +# @USER_VARIABLE > +# @DESCRIPTION: > +# Specify the version (slot) of Rust to be used by the package. This is > +# useful for troubleshooting and debugging purposes; If unset, the newes= t > +# acceptable Rust version will be used. May be combined with ERUST_TYPE. > +# This variable must not be set in ebuilds. > + > +# @ECLASS_VARIABLE: ERUST_TYPE > +# @USER_VARIABLE > +# @DESCRIPTION: > +# Specify the type of Rust to be used by the package from options: > +# 'source' or 'binary' (-bin). This is useful for troubleshooting and > +# debugging purposes. If unset, the standard eclass logic will be used > +# to determine the type of Rust to use (i.e. prefer source if binary > +# is also available). May be combined with ERUST_SLOT. > +# This variable must not be set in ebuilds. Could you perhaps add 'OVERRIDE' to the names, to make it clear they're not supposed to be normally used? Just like we have PYTHON_COMPAT_OVERRIDE in Python eclasses. --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-OfQMO1ajJYU99bCPMSTx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmdPBxcSHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQOjrsIAMmx9c5hDIt1CIiIEcdyJwDh9AYZrGHS XXijxFJM37Yz3pyoLVVEwMO2YHS78U5f0kWJJ7eff2vdJWtQbMbJyJ1CbLIE831e Fn/XwAs+k+oNXyG/kFtDe9/QTOG1bVuuokSqc2nZ7gjCGjlqgbnxx/NcesCch62O G+XWdlUqbd2Dk4QugMJdd8eIaOeWndFOqMnb6dPI/8b4IC5EaifJc6RzqP/ofwZl xGZeewiovVcqnowONSpfvJ9b6iq3USuMDLk9XmyC1paX3ovjL6i4Wa7nCyBypTcW V7Fk73FIS70zw4V+C57pIWJfEzTSajqso7C60OnQBsu7M6XuCEiDRYk= =Img/ -----END PGP SIGNATURE----- --=-OfQMO1ajJYU99bCPMSTx--