All of lore.kernel.org
 help / color / mirror / Atom feed
* Not able to set env var from anon function
@ 2015-07-09 12:12 Nithyakala Sainath
  2015-07-09 13:40 ` Burton, Ross
  2015-07-10  8:08 ` Richard Purdie
  0 siblings, 2 replies; 5+ messages in thread
From: Nithyakala Sainath @ 2015-07-09 12:12 UTC (permalink / raw)
  To: poky

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

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.

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

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

end of thread, other threads:[~2015-07-10 11:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-09 12:12 Not able to set env var from anon function Nithyakala Sainath
2015-07-09 13:40 ` Burton, Ross
2015-07-10  5:21   ` Nithyakala Sainath
2015-07-10  8:08 ` Richard Purdie
2015-07-10 11:33   ` Nithyakala Sainath

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.