[bitbake-devel] [RFC PATCH 0/1] Save the initial environment
Joshua Lock
josh at linux.intel.com
Thu Jul 21 22:12:02 UTC 2011
On Thu, 2011-07-21 at 22:22 +0100, Richard Purdie wrote:
> On Mon, 2011-07-18 at 15:33 -0700, Joshua Lock wrote:
> > Both Chris' terminal work and my reparse command will benefit from a saved
> > copy of the initial enviornment. The Python docs indicate that the os.environ
> > map is captured when the os module is first imported
> > http://docs.python.org/library/os.html#os.environ) so this patch adds a
> > variable to the bb namespace (bb.initial_environ) that is an early copy of
> > the environment.
> >
> > I put the variable here so that a) it's easily accessible and b) we can take
> > the copy pretty early on.
> >
> > Any thoughts on this? Note the RFC prefix. :-)
>
> Sorry I didn't reply earlier.
No problem.
> I'd really this the environment storage to be something we do explicitly
> in bin/bitbake alongside:
>
> # Clear away any spurious environment variables. But don't wipe the
> # environment totally. This is necessary to ensure the correct operation
> # of the UIs (e.g. for DISPLAY, etc.)
> bb.utils.clean_environment()
>
> I'd suggest we create a copy there, then pass it into cooker and its
> cooker which actually stores the copy for future reference. We may then
> need to find a way to get to that at the metadata level and from the UIs
> but what shouldn't be too difficult.
Ah yes, that feels much nicer than doing it implicitly in the library.
Expect a v2 RFC shortly (probably in your inbox tomorrow morning ;-))
Thanks,
Joshua
--
Joshua Lock
Yocto Project "Johannes Factotum"
Intel Open Source Technology Centre
More information about the bitbake-devel
mailing list