[bitbake-devel] [PATCH] bitbake: btibake server must reparse the conf between builds

Richard Purdie richard.purdie at linuxfoundation.org
Mon Dec 2 13:35:39 UTC 2013


On Fri, 2013-11-29 at 13:31 +0200, Cristiana Voicu wrote:
> When the UI event handlers are registered, the cooker reset is
> triggered. In this way it doesn't affect the cooker state.
> 
> [YOCTO #5535]
> Signed-off-by: Cristiana Voicu <cristiana.voicu at intel.com>
> ---
>  bitbake/lib/bb/server/xmlrpc.py |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/bitbake/lib/bb/server/xmlrpc.py b/bitbake/lib/bb/server/xmlrpc.py
> index 82c0e8d..fb7a8b4 100644
> --- a/bitbake/lib/bb/server/xmlrpc.py
> +++ b/bitbake/lib/bb/server/xmlrpc.py
> @@ -103,8 +103,9 @@ class BitBakeServerCommands():
>          for f in featureset:
>              self.cooker.featureset.setFeature(f)
>  
> -        if (original_featureset != list(self.cooker.featureset)):
> -            self.cooker.reset()
> +        #always reset the cooker when a remote UI Event Handler is registered,
> +        #in order to reparse the configuration files
> +        self.cooker.reset()
>  
>          self.event_handle = bb.event.register_UIHhandler(s)
>          return self.event_handle

Whilst this is simple and solves the immediate problem, I don't think
this is going to scale. We need to properly fix the server reset paths
once and for all.

This is one of those "how deep does the rabbit hole go" type problems
though. I started looking at this and firstly got very confused that we
have both cooker.loadConfigurationData and cooker.initConfigurationData.
I think one is a hack to allow hob to inject pre/post config files to
the configuration. That appears to be backed up by the
parseConfigurationFiles() command. So to move forward we need to fix
those things.

What we need is a clear separation to setting up the configuration
(including the pre/post files), then actually parsing it. In due course
we can then put code around this to know when we need to invalidate the
cache and when we do not.

Specifically, I believe that we need to:

a) Merge cooker.loadConfigurationData and  cooker.initConfigurationData 
   into one single base datastore reset function
b) Have a setPrePostConfFiles command which sets the pre/post config 
   files which hob uses
c) Figure out which of the Async commands should be sync commands (I 
   suspect most of the find*() ones.

and once we've cleared up this tangled web, we can revisit the question
of where and when we should be triggering a reset.

Cheers,

Richard







More information about the bitbake-devel mailing list