[bitbake-devel] [PATCH 03/10] cooker: user bb.configuration.data to inject events

Xu, Dongxiao dongxiao.xu at intel.com
Wed Dec 14 01:03:56 UTC 2011



> -----Original Message-----
> From: bitbake-devel-bounces at lists.openembedded.org
> [mailto:bitbake-devel-bounces at lists.openembedded.org] On Behalf Of Joshua
> Lock
> Sent: Wednesday, December 14, 2011 12:32 AM
> To: bitbake-devel at lists.openembedded.org
> Subject: Re: [bitbake-devel] [PATCH 03/10] cooker: user bb.configuration.data
> to inject events
> 
> 
> 
> On 11/12/11 18:20, Dongxiao Xu wrote:
> > For buildTargets function, we use bb.configuration.data as parameter
> > to inject events, since in hob environment, some variables are
> > modified dynamically and bb.configuration.event_data may out of date.
> >
> > Signed-off-by: Dongxiao Xu <dongxiao.xu at intel.com>
> 
> If we can't rely on event_data to be consistent/up-to-date do we need to keep
> it around? The comment around its creation implies we want/need the copy of
> data.

Hmm, I am also not sure why we need the event_data. In the cooker.py, some place we use event_data to inject events, and some other place, we use bb.configuration.data.
This event_data is introduced from an old bitbake commit: b708cf280fd1bc9566f822eeff4cc670a3ce28a0.
Hope Richard can give more hints on it?

Thanks,
Dongxiao

> 
> This feels like we're working around on issue rather than fixing one.
> 
> Joshua

> 
> > ---
> >  lib/bb/cooker.py |    4 ++--
> >  1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index
> > 2c02e28..6ddb38e 100644
> > --- a/lib/bb/cooker.py
> > +++ b/lib/bb/cooker.py
> > @@ -1085,7 +1085,7 @@ class BBCooker:
> >                  return False
> >
> >              if not retval:
> > -                bb.event.fire(bb.event.BuildCompleted(buildname,
> targets, failures), self.configuration.event_data)
> > +                bb.event.fire(bb.event.BuildCompleted(buildname,
> > + targets, failures), self.configuration.data)
> >                  self.command.finishAsyncCommand()
> >                  return False
> >              if retval is True:
> > @@ -1095,7 +1095,7 @@ class BBCooker:
> >          self.buildSetVars()
> >
> >          buildname = self.configuration.data.getVar("BUILDNAME")
> > -        bb.event.fire(bb.event.BuildStarted(buildname, targets),
> self.configuration.event_data)
> > +        bb.event.fire(bb.event.BuildStarted(buildname, targets),
> > + self.configuration.data)
> >
> >          localdata = data.createCopy(self.configuration.data)
> >          bb.data.update_data(localdata)
> 
> --
> Joshua Lock
>         Yocto Project "Johannes factotum"
>         Intel Open Source Technology Centre
> 
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel




More information about the bitbake-devel mailing list