From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Cc: "chris.laplante@agilent.com" <chris.laplante@agilent.com>,
Richard Purdie <richard.purdie@linuxfoundation.org>,
OE Core mailing list <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] why does oe-buildenv-internal check for -z "$BDIR"?
Date: Sat, 18 Apr 2020 14:55:37 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.21.2004181451100.4214@localhost.localdomain> (raw)
In-Reply-To: <fc3149fc55b34156baee2c375002a2a6@XBOX03.axis.com>
On Sat, 18 Apr 2020, Peter Kjellerstedt wrote:
> > -----Original Message-----
> > From: openembedded-core@lists.openembedded.org <openembedded-
> > core@lists.openembedded.org> On Behalf Of Robert P. J. Day
> > Sent: den 18 april 2020 19:24
> > To: chris.laplante@agilent.com
> > Cc: Richard Purdie <richard.purdie@linuxfoundation.org>; OE Core mailing
> > list <openembedded-core@lists.openembedded.org>
> > Subject: Re: [OE-core] why does oe-buildenv-internal check for -z
> > "$BDIR"?
> >
> > On Sat, 18 Apr 2020, chris.laplante@agilent.com wrote:
> >
> > > > i know that -- in fact, it's the only way i use it -- the question
> > > > is the purpose for checking if $BDIR is zero length first. that is,
> > > > under what circumstances could it *not* be? even invoking the way you
> > > > demonstrate, that variable is empty when tested, and i see nothing
> > > > that could cause it to have a value before that test.
> > >
> > > FWIW I was curious/bored and looked to see if 'BDIR' was ever used
> > > in poky (outside of the script of course), and I found no results.
> > >
> > > git rev-list --all | xargs git grep -w BDIR -- './*' ':!scripts/oe-
> > buildenv-internal'
> >
> > that's kind of the point i was making ... that variable appeared out
> > of nowhere, clearly seemed like a local variable, and is even "unset"
> > after it's used in that script. i poked around, trying to figure if
> > there was some other flow of control that got you into that script
> > from another direction, but i didn't find one.
> >
> > and, yes, it seems trivial to obsess over it, but it's just those
> > sorts of things that make me wonder, "hmmmmm ... maybe i *don't*
> > really understand how this script can be used."
> >
> > anyway, moving on ...
> >
> > rday
>
> When it comes to understanding why the code looks like it does in a
> case like this, it is often better to look at the history than the
> current state.
>
> If you go back to when the test was introduced (commit
> 5d5fab77cf9616bf62023c202b38f309f8bbf189 in Poky), you will see that
> BDIR could be set in a script called poky-autobuild at that time.
> The poky-autobuild script was removed 12 years ago, but the test in
> oe-buildenv-internal remained.
i did a (cursory) check of history; obviously, i did not look
closely enough. my bad.
rday
next prev parent reply other threads:[~2020-04-18 18:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-18 16:04 why does oe-buildenv-internal check for -z "$BDIR"? Robert P. J. Day
2020-04-18 16:30 ` [OE-core] " Richard Purdie
2020-04-18 16:43 ` Robert P. J. Day
2020-04-18 17:08 ` Chris Laplante
2020-04-18 17:23 ` Robert P. J. Day
2020-04-18 18:45 ` Peter Kjellerstedt
2020-04-18 18:55 ` Robert P. J. Day [this message]
2020-04-18 20:10 ` Robert P. J. Day
2020-04-18 22:13 ` Christopher Larson
2020-04-18 22:17 ` Robert P. J. Day
2020-04-18 23:39 ` Richard Purdie
2020-04-19 13:11 ` Robert P. J. Day
2020-04-18 22:19 ` Robert P. J. Day
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=alpine.LFD.2.21.2004181451100.4214@localhost.localdomain \
--to=rpjday@crashcourse.ca \
--cc=chris.laplante@agilent.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=peter.kjellerstedt@axis.com \
--cc=richard.purdie@linuxfoundation.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