diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2017-05-03 15:38:53 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-05-18 14:01:38 +0100 |
commit | cab20f3b2fe668a63c58b44f2ad797fed74226fe (patch) | |
tree | 8b2171c9260481799144352569e391d9050e319e /meta-skeleton | |
parent | 35d2cb0c7945d5d115b8e5a320b6bd769cb61a27 (diff) | |
download | openembedded-core-cab20f3b2fe668a63c58b44f2ad797fed74226fe.tar.gz openembedded-core-cab20f3b2fe668a63c58b44f2ad797fed74226fe.tar.bz2 openembedded-core-cab20f3b2fe668a63c58b44f2ad797fed74226fe.zip |
QemuRunner: avoid tainting os.environ
That a utility function permanently changes the process environment is
bad style and leads to subtle, hard to debug problems.
For example, we had one oe-selftest which used runqemu() with an
override for DEPLOY_DIR_IMAGE. Another test then just called runCmd()
and ended up passing the wrong DEPLOY_DIR_IMAGE set earlier in
os.environ.
The approach used here is to pass the desired environment dict to the
launch() method as a new, optional parameter, which then gets passed
on to subproject.Popen(). The modified env variables do not get
logged, as before.
[YOCTO #11443]
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta-skeleton')
0 files changed, 0 insertions, 0 deletions