[poky] Not able to set env var from anon function
Nithyakala Sainath
nithisai at gmail.com
Thu Jul 9 05:12:29 PDT 2015
Hello all,
I was playing with environmental variables and datastore that I fell into
this situation:
In a reccipe a.bb
export TEMPDIR = "temp"
python() {
os.environ["TEMPDIR"] = "randomvalue"
}
do_compile() {
echo ${TEMPDIR }
}
gives me "temp" as the answer. I was expecting "randomvalue". Can I not
modify the environmental variables and create new ones in anon functions ?
But d.setVar("TEMPDIR", "randomvalue") in place of os.environ does the
mgic. Why can't we manipulate the environmental variable using os.environ ?
In bitbake.conf, we see that we can get env vars using os.getenv.
Thanks,
Nithyakala.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/poky/attachments/20150709/941fcc77/attachment.html>
More information about the poky
mailing list