Openembedded Bitbake Development
 help / color / mirror / Atom feed
* [PATCH 0/1] utils.py: fix BB_ENV_WHITELIST
@ 2013-03-16  8:07 Robert Yang
  2013-03-16  8:07 ` [PATCH 1/1] " Robert Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Yang @ 2013-03-16  8:07 UTC (permalink / raw)
  To: bitbake-devel; +Cc: qingtao.cao

The following changes since commit 1ceb13dda11645229053fc4840954333f8910ba4:

  icecc: improve interaction with sstate (2013-03-15 01:53:05 +0000)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib robert/bb_white
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/bb_white

Robert Yang (1):
  utils.py: fix BB_ENV_WHITELIST

 bitbake/lib/bb/utils.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

-- 
1.7.7




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

* [PATCH 1/1] utils.py: fix BB_ENV_WHITELIST
  2013-03-16  8:07 [PATCH 0/1] utils.py: fix BB_ENV_WHITELIST Robert Yang
@ 2013-03-16  8:07 ` Robert Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2013-03-16  8:07 UTC (permalink / raw)
  To: bitbake-devel; +Cc: qingtao.cao

The BB_ENV_WHITELIST doesn't work well and flushes BB_ENV_EXTRAWHITE,
here is an example:

$ export BB_ENV_WHITELIST

$ export BB_NUMBER_THREADS=10 (or other value)

Edit conf/local.conf, change "BB_NUMBER_THREADS =" to "BB_NUMBER_THREADS ?="

$ bitbake -e | grep '^BB_NUMBER_THREADS ='
we will notice that BB_NUMBER_THREADS' value doesn't change, though
BB_NUMBER_THREADS in both BB_ENV_WHITELIST and BB_ENV_EXTRAWHITE.

This is because the "approved" inside the function approved_variables
doesn't include BB_ENV_WHITELIST or BB_ENV_EXTRAWHITE when
BB_ENV_WHITELIST is set (they are incuded by preserved_envvars()), so
the BB_ENV_WHITELIST and BB_ENV_EXTRAWHITE will be removed from the env
in the first call from bin/bitbake, and when it is called again by
cooker.py, their value will be None, then the vars inside them will be
removed from the env.

Add BB_ENV_WHITELIST and BB_ENV_EXTRAWHITE to the "approved" would fix
the problem.

[YOCTO #4031]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 bitbake/lib/bb/utils.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py
index b2f81c8..d671f56 100644
--- a/bitbake/lib/bb/utils.py
+++ b/bitbake/lib/bb/utils.py
@@ -496,10 +496,13 @@ def approved_variables():
     approved = []
     if 'BB_ENV_WHITELIST' in os.environ:
         approved = os.environ['BB_ENV_WHITELIST'].split()
+        approved.extend(['BB_ENV_WHITELIST'])
     else:
         approved = preserved_envvars()
     if 'BB_ENV_EXTRAWHITE' in os.environ:
         approved.extend(os.environ['BB_ENV_EXTRAWHITE'].split())
+        if 'BB_ENV_EXTRAWHITE' not in approved:
+            approved.extend(['BB_ENV_EXTRAWHITE'])
     return approved
 
 def clean_environment():
-- 
1.7.7




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

end of thread, other threads:[~2013-03-16  8:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-16  8:07 [PATCH 0/1] utils.py: fix BB_ENV_WHITELIST Robert Yang
2013-03-16  8:07 ` [PATCH 1/1] " Robert Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox