From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Alex Kiernan <alex.kiernan@gmail.com>
Cc: Ross Burton <Ross.Burton@arm.com>,
OE Core mailing list <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] more ptest pedantry: why conditionally include "run-ptest" in SRC_URI?
Date: Mon, 12 Feb 2024 09:46:05 -0500 (EST) [thread overview]
Message-ID: <ac14ca2-ef63-6ee-d01b-c4ed4b65d78@crashcourse.ca> (raw)
In-Reply-To: <CAO5Uq5Qyr7ca2rcVtRs4seSyKid58J3ZGhRHuynm-AFYgM1PXw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2003 bytes --]
On Mon, 12 Feb 2024, Alex Kiernan wrote:
> On Mon, Feb 12, 2024 at 12:17 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> >
> > On Mon, 12 Feb 2024, Ross Burton wrote:
> >
> > > On 12 Feb 2024, at 06:39, Robert P. J. Day via lists.openembedded.org <rpjday=crashcourse.ca@lists.openembedded.org> wrote:
> > > > more annoying nitpickery ... here:
> > > >
> > > > https://git.openembedded.org/openembedded-core/tree/meta/recipes-extended/xz/xz_5.4.5.bb#n28
> > > >
> > > > it's not clear why someone would go to the trouble of conditionally
> > > > including run-ptest in SRC_URI as i would have thought the only
> > > > benefit would be to avoid the triviality of copying run-ptest into
> > > > WORKDIR, but beyond that, i don't see what the point is, and that's
> > > > the only recipe i've run across that bothers to do that.
> > > >
> > > > is there something more subtle happening here?
> > >
> > > No good reason, and I’d approve a patch that removed the
> > > conditionals on the grounds of cleaning up the recipe and ensuring
> > > that there’s less conditional paths through the recipe.
> >
> > it gets even stranger when you have a conditional to apply a test
> > patch, like here:
> >
> > https://git.openembedded.org/meta-openembedded/tree/meta-networking/recipes-protocols/freediameter/freediameter_1.4.0.bb#n21
> >
> > i am also assuming that it's cleaner to conditionally check for
> > ptest assignment for stuff like SRC_URI and DEPENDS, not with:
> >
> > ${@bb.utils.contains('DISTRO_FEATURES', 'ptest' ...
> >
> > but with the more intuitive:
> >
> > ${@bb.utils.contains('PTEST_ENABLED', '1', ...
> >
>
> The PTEST_ENABLED version has the advantage that disabling ptest for a
> single recipe is much easier. I guess you could manipulate
> DISTRO_FEATURES on a per-recipe basis, but that feels awful.
so you're confirming that the second form is equivalent, and more
intuitive? i just wanted to make sure (again) that there was no
subtlety i was overlooking.
rday
next prev parent reply other threads:[~2024-02-12 14:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-12 6:39 more ptest pedantry: why conditionally include "run-ptest" in SRC_URI? Robert P. J. Day
2024-02-12 6:47 ` Robert P. J. Day
2024-02-12 10:04 ` [OE-core] " Alexander Kanavin
2024-02-12 11:48 ` Ross Burton
2024-02-12 12:17 ` Robert P. J. Day
2024-02-12 12:55 ` Alex Kiernan
2024-02-12 14:46 ` Robert P. J. Day [this message]
2024-02-12 15:00 ` Alex Kiernan
2024-02-12 16:11 ` Ross Burton
2024-02-13 11:21 ` Robert P. J. Day
2024-02-13 16:25 ` Alex Kiernan
2024-02-13 11:35 ` Robert P. J. Day
2024-02-13 15:23 ` Peter Kjellerstedt
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=ac14ca2-ef63-6ee-d01b-c4ed4b65d78@crashcourse.ca \
--to=rpjday@crashcourse.ca \
--cc=Ross.Burton@arm.com \
--cc=alex.kiernan@gmail.com \
--cc=openembedded-core@lists.openembedded.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