From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: Matt Jolly <kangie@gentoo.org>
Subject: Re: [gentoo-dev] [PATCH] rust.eclass: add ERUST_{SLOT,TYPE} user variables
Date: Tue, 03 Dec 2024 14:26:47 +0100 [thread overview]
Message-ID: <2d6823930bf7b81f235f326d7a40482275ef7b6e.camel@gentoo.org> (raw)
In-Reply-To: <20241203122236.1592666-2-kangie@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 2229 bytes --]
On Tue, 2024-12-03 at 22:22 +1000, kangie@gentoo.org wrote:
> From: Matt Jolly <kangie@gentoo.org>
>
> These variables enable users (though most likely Gentoo developers)
> to override the selection of the Rust implementation by the eclass.
>
> 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.
>
> 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.
>
> Closes: https://bugs.gentoo.org/945752
> Signed-off-by: Matt Jolly <kangie@gentoo.org>
> ---
> eclass/rust.eclass | 49 +++++++++++++++++++++++++++++++++++++++++-----
> 1 file changed, 44 insertions(+), 5 deletions(-)
>
> 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=(
> "1.54.0"
> )
>
> +# == user control knobs ==
> +
> +# @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 newest
> +# 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.
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
next prev parent reply other threads:[~2024-12-03 13:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 12:22 [gentoo-dev] [PATCH] rust.eclass: add ERUST_{SLOT,TYPE} user variables kangie
2024-12-03 13:26 ` Michał Górny [this message]
2024-12-04 1:38 ` Matt Jolly
2024-12-04 17:45 ` Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2d6823930bf7b81f235f326d7a40482275ef7b6e.camel@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
--cc=kangie@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox