From: Gary Thomas <gary@mlbassoc.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] hand the TEMPLATECONF local over to setup-builddir
Date: Tue, 22 Sep 2015 16:15:00 -0600 [thread overview]
Message-ID: <5601D2E4.50503@mlbassoc.com> (raw)
In-Reply-To: <CALg11mhL1YMX_1aW8FUQoT5qJEgESe3SSQvk+40gukiA2Ffidg@mail.gmail.com>
On 2015-09-22 14:25, Lee Nipper wrote:
> On Tue, Sep 22, 2015 at 1:45 PM, Marcus Müller <marcus.mueller@ettus.com <mailto:marcus.mueller@ettus.com>> wrote:
>
> Hello,
> > If I understand correctly it allows a user prepared $TEMPLATECONF
> > directory
> > to be used by oe-setup-builddir.
> Indeed; the point is that oe-setup-builddir was definitely meant to be
> used with a TEMPLATECONF set by the user; in bash, the TEMPLATECONF
> local variable is automatically passed on from oe-init-build-env to
> oe-setup-builddir¹, but in zsh, this doesn't work without explicitely
> declaring that should happen (which is the only thing my patch does).
>
> Best regards,
> Marcus
>
> ¹ not quite sure how; it's a local to the calling script and shouldn't
> be a local or env variable to the callee, IMHO.
>
>
>
> Hello Marcus,
>
> FWIW, I did some test cases to understand the differences.
>
> With bash 4.3.11, and the examples below,
> cases A and B will pass along TEMPLATECONF, but case C does not.
> Your patch makes case C work as well.
>
> # A:
>
> TEMPLATECONF=$HOME/my-template-dir source ~/openembedded-core/oe-init-build-env $HOME/my-build-dir
>
> # B:
> export TEMPLATECONF=$HOME/my-template-dir; source ~/openembedded-core/oe-init-build-env $HOME/my-build-dir
>
> # C:
> TEMPLATECONF=$HOME/my-template-dir; source ~/openembedded-core/oe-init-build-env $HOME/my-build-dir
>
>
> And with zsh 5.0.2, case B will pass along TEMPLATECONF, but cases A and C do not.
> Your patch makes cases A and C work as well with zsh.
>
> I did not expect case A to be different than case C for bash, but it apparently works differently than I thought.
This is indeed expected behaviour - environment variables defined
on the command line before the command itself are local to that
command's execution only.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
next prev parent reply other threads:[~2015-09-22 22:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 17:44 [PATCH] hand the TEMPLATECONF local over to setup-builddir Marcus Müller
2015-09-22 18:40 ` Lee Nipper
2015-09-22 18:45 ` Marcus Müller
2015-09-22 20:25 ` Lee Nipper
2015-09-22 22:15 ` Gary Thomas [this message]
2015-09-23 9:06 ` Marcus Müller
2015-12-07 10:56 ` Marcus Müller
2015-12-16 20:18 ` Philip Balister
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=5601D2E4.50503@mlbassoc.com \
--to=gary@mlbassoc.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