[yocto] Are environment variables specified in BB_ENV_EXTRAWHITE passed down to scripts called by recipies?

Josias Inacio da Silva Filho josiasinacio at hotmail.com
Sun Feb 25 00:19:35 PST 2018


Hi folks,

I haven’t found much documentation on this behaviour. Note that this is for Yocto release 2.4 Rocko.

Let’s say I have a .bb recipe with the following task:

do_something() {
   cd ${S}
   ./my_script.sh
}

And that “my_script.sh” is doing a git clone. I have noticed that the clone is failing due to SSH_AUTH_SOCK not being set, even though it is part of BB_ENV_EXTRAWHITE. If I echo $SSH_AUTH_SOCK and $BB_ENV_EXTRAWHITE values in “my_script.sh”, they are both empty.

However if I add this line in the recipe, everything works fine and the echoed value of $SSH_AUTH_SOCK shows up correctly in “my_script.sh":

export SSH_AUTH_SOCK

That same recipe without the export line used to work fine before for a different project that uses an older version of Yocto (Morty 2.2 I believe).

So: By default, should “my_script.sh” be seeing that key value without the need of the export line mentioned above? If not, then was that a recent change since it worked on previous Yocto releases?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180225/c3192d6f/attachment.html>


More information about the yocto mailing list