Reputation: 2527
In a bitbake recipe, my shell task needs to export http_proxy
to the process it calls. http_proxy
is whitelisted in BB_ENV_EXTRAWHITE
, so the value exported from the shell which starts bitbake
is available in the recipe as ${http_proxy}
.
To export it to the child task, I'm doing
export http_proxy = ${http_proxy}
my_process
This works, but leaves a feeling of redundant syntax to me. Is this the right way to pass the parent environment variable to a bitbake task?
Upvotes: 5
Views: 17820
Reputation: 1011
I think that is proper way of accessing variables from environment in bitbake tasks, please see
http://www.yoctoproject.org/docs/2.4.1/bitbake-user-manual/bitbake-user-manual.html#exporting-variables-to-the-environment.
And (in my opinion) Bitbake was designed to isolate from user environment and this - redundant syntax is the price for archive this feature.
Upvotes: 3