* Conditional assignment broken @ 2011-08-12 22:50 James Limbouris 2011-08-12 23:29 ` Joshua Lock 2011-08-15 8:43 ` Richard Purdie 0 siblings, 2 replies; 6+ messages in thread From: James Limbouris @ 2011-08-12 22:50 UTC (permalink / raw) To: bitbake-devel Hi, Commit 21c21fcc5871e81d8d497b6baed605cdd74c4571 breaks conditional assignment in all conf files. Previously, the environment was copied from a cleaned up os environment. After the commit, a pristine environment is available in data['_data'], and will be copied to data[] on conditional assignment, defying BB_ENV_EXTRAWHITE. Variables not conditionally assigned will still be available from data['_data'], also in defiance of BB_ENV_EXTRAWHITE. To verify, simply: export RANDOMENV=42 bitbake -e | grep RANDOMENV James ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Conditional assignment broken 2011-08-12 22:50 Conditional assignment broken James Limbouris @ 2011-08-12 23:29 ` Joshua Lock 2011-08-12 23:32 ` Chris Larson 2011-08-15 8:43 ` Richard Purdie 1 sibling, 1 reply; 6+ messages in thread From: Joshua Lock @ 2011-08-12 23:29 UTC (permalink / raw) To: bitbake-devel On Sat, 2011-08-13 at 06:50 +0800, James Limbouris wrote: > Hi, > > Commit 21c21fcc5871e81d8d497b6baed605cdd74c4571 breaks conditional assignment > in all conf files. Previously, the environment was copied from a > cleaned up os environment. > After the commit, a pristine environment is available in > data['_data'], and will be copied to > data[] on conditional assignment, defying BB_ENV_EXTRAWHITE. > Variables not conditionally > assigned will still be available from data['_data'], also in defiance > of BB_ENV_EXTRAWHITE. > > To verify, simply: > > export RANDOMENV=42 > bitbake -e | grep RANDOMENV Thanks for the report James, and apologies for the breakage. I'll try and get a fix submitted and merged asap. I'm now wondering if we want the pristine environment, or the cleaned environment, saved. diff --git a/bin/bitbake b/bin/bitbake index fdeeb36..d151dd5 100755 --- a/bin/bitbake +++ b/bin/bitbake @@ -197,13 +197,11 @@ Default BBFILES are the .bb files in the current directory handler = bb.event.LogHandler() logger.addHandler(handler) - # Before we start modifying the environment we should take a pristine - # copy for possible later use - initialenv = os.environ.copy() # 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() + initialenv = os.environ.copy() server = server.BitBakeServer() Joshua -- Joshua Lock Yocto Project "Johannes factotum" Intel Open Source Technology Centre ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Conditional assignment broken 2011-08-12 23:29 ` Joshua Lock @ 2011-08-12 23:32 ` Chris Larson 2011-08-12 23:42 ` Joshua Lock 0 siblings, 1 reply; 6+ messages in thread From: Chris Larson @ 2011-08-12 23:32 UTC (permalink / raw) To: Joshua Lock; +Cc: bitbake-devel On Fri, Aug 12, 2011 at 4:29 PM, Joshua Lock <josh@linux.intel.com> wrote: > On Sat, 2011-08-13 at 06:50 +0800, James Limbouris wrote: >> Hi, >> >> Commit 21c21fcc5871e81d8d497b6baed605cdd74c4571 breaks conditional assignment >> in all conf files. Previously, the environment was copied from a >> cleaned up os environment. >> After the commit, a pristine environment is available in >> data['_data'], and will be copied to >> data[] on conditional assignment, defying BB_ENV_EXTRAWHITE. >> Variables not conditionally >> assigned will still be available from data['_data'], also in defiance >> of BB_ENV_EXTRAWHITE. >> >> To verify, simply: >> >> export RANDOMENV=42 >> bitbake -e | grep RANDOMENV > > Thanks for the report James, and apologies for the breakage. I'll try > and get a fix submitted and merged asap. > > I'm now wondering if we want the pristine environment, or the cleaned > environment, saved. For things like devshell, I think it would be nice to retain a copy of the original, unmodified environment. -- Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Conditional assignment broken 2011-08-12 23:32 ` Chris Larson @ 2011-08-12 23:42 ` Joshua Lock 2011-08-13 0:00 ` Chris Larson 0 siblings, 1 reply; 6+ messages in thread From: Joshua Lock @ 2011-08-12 23:42 UTC (permalink / raw) To: Chris Larson; +Cc: bitbake-devel On Fri, 2011-08-12 at 16:32 -0700, Chris Larson wrote: > On Fri, Aug 12, 2011 at 4:29 PM, Joshua Lock <josh@linux.intel.com> wrote: > > On Sat, 2011-08-13 at 06:50 +0800, James Limbouris wrote: > >> Hi, > >> > >> Commit 21c21fcc5871e81d8d497b6baed605cdd74c4571 breaks conditional assignment > >> in all conf files. Previously, the environment was copied from a > >> cleaned up os environment. > >> After the commit, a pristine environment is available in > >> data['_data'], and will be copied to > >> data[] on conditional assignment, defying BB_ENV_EXTRAWHITE. > >> Variables not conditionally > >> assigned will still be available from data['_data'], also in defiance > >> of BB_ENV_EXTRAWHITE. > >> > >> To verify, simply: > >> > >> export RANDOMENV=42 > >> bitbake -e | grep RANDOMENV > > > > Thanks for the report James, and apologies for the breakage. I'll try > > and get a fix submitted and merged asap. > > > > I'm now wondering if we want the pristine environment, or the cleaned > > environment, saved. > > For things like devshell, I think it would be nice to retain a copy of > the original, unmodified environment. Agreed, that was one of the intended consumers. I guess I need to drink more coffee and figure out the *right* fix then... Joshua -- Joshua Lock Yocto Project "Johannes factotum" Intel Open Source Technology Centre ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Conditional assignment broken 2011-08-12 23:42 ` Joshua Lock @ 2011-08-13 0:00 ` Chris Larson 0 siblings, 0 replies; 6+ messages in thread From: Chris Larson @ 2011-08-13 0:00 UTC (permalink / raw) To: Joshua Lock; +Cc: bitbake-devel On Fri, Aug 12, 2011 at 4:42 PM, Joshua Lock <josh@linux.intel.com> wrote: > On Fri, 2011-08-12 at 16:32 -0700, Chris Larson wrote: >> On Fri, Aug 12, 2011 at 4:29 PM, Joshua Lock <josh@linux.intel.com> wrote: >> > On Sat, 2011-08-13 at 06:50 +0800, James Limbouris wrote: >> >> Hi, >> >> >> >> Commit 21c21fcc5871e81d8d497b6baed605cdd74c4571 breaks conditional assignment >> >> in all conf files. Previously, the environment was copied from a >> >> cleaned up os environment. >> >> After the commit, a pristine environment is available in >> >> data['_data'], and will be copied to >> >> data[] on conditional assignment, defying BB_ENV_EXTRAWHITE. >> >> Variables not conditionally >> >> assigned will still be available from data['_data'], also in defiance >> >> of BB_ENV_EXTRAWHITE. >> >> >> >> To verify, simply: >> >> >> >> export RANDOMENV=42 >> >> bitbake -e | grep RANDOMENV >> > >> > Thanks for the report James, and apologies for the breakage. I'll try >> > and get a fix submitted and merged asap. >> > >> > I'm now wondering if we want the pristine environment, or the cleaned >> > environment, saved. >> >> For things like devshell, I think it would be nice to retain a copy of >> the original, unmodified environment. > > Agreed, that was one of the intended consumers. I guess I need to drink > more coffee and figure out the *right* fix then... You could pass the key list from the filtered env along with the unfiltered dict to inheritFromOS, rather than using all the keys from the unfiltered env, I would think. -- Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Conditional assignment broken 2011-08-12 22:50 Conditional assignment broken James Limbouris 2011-08-12 23:29 ` Joshua Lock @ 2011-08-15 8:43 ` Richard Purdie 1 sibling, 0 replies; 6+ messages in thread From: Richard Purdie @ 2011-08-15 8:43 UTC (permalink / raw) To: James Limbouris; +Cc: bitbake-devel Hi James, On Sat, 2011-08-13 at 06:50 +0800, James Limbouris wrote: > Commit 21c21fcc5871e81d8d497b6baed605cdd74c4571 breaks conditional assignment > in all conf files. Previously, the environment was copied from a > cleaned up os environment. > After the commit, a pristine environment is available in > data['_data'], and will be copied to > data[] on conditional assignment, defying BB_ENV_EXTRAWHITE. > Variables not conditionally > assigned will still be available from data['_data'], also in defiance > of BB_ENV_EXTRAWHITE. > > To verify, simply: > > export RANDOMENV=42 > bitbake -e | grep RANDOMENV Thanks for finding this. Is this related to the pseudo issue you mentioned on the OE-Core list? I'm guessing this would explain that. I've merged Joshua's fix into master so hopefully we've got the environment issues fixed at least. Cheers, Richard ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-08-15 8:48 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-08-12 22:50 Conditional assignment broken James Limbouris 2011-08-12 23:29 ` Joshua Lock 2011-08-12 23:32 ` Chris Larson 2011-08-12 23:42 ` Joshua Lock 2011-08-13 0:00 ` Chris Larson 2011-08-15 8:43 ` Richard Purdie
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.