All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hand the TEMPLATECONF local over to setup-builddir
@ 2015-09-22 17:44 Marcus Müller
  2015-09-22 18:40 ` Lee Nipper
  2015-12-16 20:18 ` Philip Balister
  0 siblings, 2 replies; 8+ messages in thread
From: Marcus Müller @ 2015-09-22 17:44 UTC (permalink / raw)
  To: openembedded-core

---
 oe-init-build-env | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/oe-init-build-env b/oe-init-build-env
index 6fee5f7..b7e2918 100755
--- a/oe-init-build-env
+++ b/oe-init-build-env
@@ -45,7 +45,7 @@ fi
 OEROOT=`readlink -f "$OEROOT"`
 export OEROOT
 . $OEROOT/scripts/oe-buildenv-internal && \
-     $OEROOT/scripts/oe-setup-builddir && \
+     TEMPLATECONF="$TEMPLATECONF" $OEROOT/scripts/oe-setup-builddir && \
      [ -n "$BUILDDIR" ] && cd "$BUILDDIR"
 unset OEROOT
 unset BBPATH
-- 
2.4.3



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] hand the TEMPLATECONF local over to setup-builddir
  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-12-16 20:18 ` Philip Balister
  1 sibling, 1 reply; 8+ messages in thread
From: Lee Nipper @ 2015-09-22 18:40 UTC (permalink / raw)
  To: Marcus Müller; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 841 bytes --]

On Tue, Sep 22, 2015 at 12:44 PM, Marcus Müller <marcus.mueller@ettus.com>
wrote:

> ---
>  oe-init-build-env | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/oe-init-build-env b/oe-init-build-env
> index 6fee5f7..b7e2918 100755
> --- a/oe-init-build-env
> +++ b/oe-init-build-env
> @@ -45,7 +45,7 @@ fi
>  OEROOT=`readlink -f "$OEROOT"`
>  export OEROOT
>  . $OEROOT/scripts/oe-buildenv-internal && \
> -     $OEROOT/scripts/oe-setup-builddir && \
> +     TEMPLATECONF="$TEMPLATECONF" $OEROOT/scripts/oe-setup-builddir && \
>       [ -n "$BUILDDIR" ] && cd "$BUILDDIR"
>  unset OEROOT
>  unset BBPATH
>
>
I think this patch is a good candidate for back-porting to the fido branch.
If I understand correctly it allows a user prepared $TEMPLATECONF directory
to be used by oe-setup-builddir.

[-- Attachment #2: Type: text/html, Size: 1423 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] hand the TEMPLATECONF local over to setup-builddir
  2015-09-22 18:40 ` Lee Nipper
@ 2015-09-22 18:45   ` Marcus Müller
  2015-09-22 20:25     ` Lee Nipper
  0 siblings, 1 reply; 8+ messages in thread
From: Marcus Müller @ 2015-09-22 18:45 UTC (permalink / raw)
  To: Lee Nipper; +Cc: openembedded-core

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.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] hand the TEMPLATECONF local over to setup-builddir
  2015-09-22 18:45   ` Marcus Müller
@ 2015-09-22 20:25     ` Lee Nipper
  2015-09-22 22:15       ` Gary Thomas
  2015-09-23  9:06       ` Marcus Müller
  0 siblings, 2 replies; 8+ messages in thread
From: Lee Nipper @ 2015-09-22 20:25 UTC (permalink / raw)
  To: Marcus Müller; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1598 bytes --]

On Tue, Sep 22, 2015 at 1:45 PM, Marcus Müller <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.

Best regards,
Lee

[-- Attachment #2: Type: text/html, Size: 2318 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] hand the TEMPLATECONF local over to setup-builddir
  2015-09-22 20:25     ` Lee Nipper
@ 2015-09-22 22:15       ` Gary Thomas
  2015-09-23  9:06       ` Marcus Müller
  1 sibling, 0 replies; 8+ messages in thread
From: Gary Thomas @ 2015-09-22 22:15 UTC (permalink / raw)
  To: openembedded-core

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
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] hand the TEMPLATECONF local over to setup-builddir
  2015-09-22 20:25     ` Lee Nipper
  2015-09-22 22:15       ` Gary Thomas
@ 2015-09-23  9:06       ` Marcus Müller
  2015-12-07 10:56         ` Marcus Müller
  1 sibling, 1 reply; 8+ messages in thread
From: Marcus Müller @ 2015-09-23  9:06 UTC (permalink / raw)
  To: Lee Nipper; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1937 bytes --]

Hello Lee,

wow, thanks for clearing testing this; actually, to trigger my personal
need for a patch, variant # A was used.

Cheers,
Marcus

On 22.09.2015 22: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.
>
> Best regards,
> Lee
>


[-- Attachment #2: Type: text/html, Size: 4051 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] hand the TEMPLATECONF local over to setup-builddir
  2015-09-23  9:06       ` Marcus Müller
@ 2015-12-07 10:56         ` Marcus Müller
  0 siblings, 0 replies; 8+ messages in thread
From: Marcus Müller @ 2015-12-07 10:56 UTC (permalink / raw)
  To: openembedded-core


[-- Attachment #1.1: Type: text/plain, Size: 2380 bytes --]

Ping!
Attaching a version of the patch that works with current master; without
the fix, oe-init-build-env simply doesn't work with zsh.

It really isn't a big patch, so if you need me to correct anything, please
don't hesitate to point me to it; I'm totally new to openembedded, so if my
contribution doesn't meet OE expectations, I won't object to any criticism
:)

Best regards,
Marcus

On Wed, Sep 23, 2015 at 11:06 AM, Marcus Müller <marcus.mueller@ettus.com>
wrote:

> Hello Lee,
>
> wow, thanks for clearing testing this; actually, to trigger my personal
> need for a patch, variant # A was used.
>
> Cheers,
> Marcus
>
>
> On 22.09.2015 22:25, Lee Nipper wrote:
>
> On Tue, Sep 22, 2015 at 1:45 PM, Marcus Müller <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.
>
> Best regards,
> Lee
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 4714 bytes --]

[-- Attachment #2: 0001-hand-the-TEMPLATECONF-local-over-to-setup-builddir.patch --]
[-- Type: text/x-patch, Size: 764 bytes --]

From 12da2fbe29219a29cb61b11b1561e6625ad7ef85 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20M=C3=BCller?= <marcus.mueller@ettus.com>
Date: Mon, 7 Dec 2015 11:48:40 +0100
Subject: [PATCH] hand the TEMPLATECONF local over to setup-builddir

---
 oe-init-build-env | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/oe-init-build-env b/oe-init-build-env
index 6fee5f7..b7e2918 100755
--- a/oe-init-build-env
+++ b/oe-init-build-env
@@ -45,7 +45,7 @@ fi
 OEROOT=`readlink -f "$OEROOT"`
 export OEROOT
 . $OEROOT/scripts/oe-buildenv-internal && \
-     $OEROOT/scripts/oe-setup-builddir && \
+     TEMPLATECONF="$TEMPLATECONF" $OEROOT/scripts/oe-setup-builddir && \
      [ -n "$BUILDDIR" ] && cd "$BUILDDIR"
 unset OEROOT
 unset BBPATH
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] hand the TEMPLATECONF local over to setup-builddir
  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-12-16 20:18 ` Philip Balister
  1 sibling, 0 replies; 8+ messages in thread
From: Philip Balister @ 2015-12-16 20:18 UTC (permalink / raw)
  To: Marcus Müller, openembedded-core

Ping. Marcus works with me and he is nagging me about this.

On 09/22/2015 01:44 PM, Marcus Müller wrote:
> ---
>  oe-init-build-env | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/oe-init-build-env b/oe-init-build-env
> index 6fee5f7..b7e2918 100755
> --- a/oe-init-build-env
> +++ b/oe-init-build-env
> @@ -45,7 +45,7 @@ fi
>  OEROOT=`readlink -f "$OEROOT"`
>  export OEROOT
>  . $OEROOT/scripts/oe-buildenv-internal && \
> -     $OEROOT/scripts/oe-setup-builddir && \
> +     TEMPLATECONF="$TEMPLATECONF" $OEROOT/scripts/oe-setup-builddir && \
>       [ -n "$BUILDDIR" ] && cd "$BUILDDIR"
>  unset OEROOT
>  unset BBPATH
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-12-16 20:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2015-09-23  9:06       ` Marcus Müller
2015-12-07 10:56         ` Marcus Müller
2015-12-16 20:18 ` Philip Balister

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.