bitbake: btibake server must reparse the conf between builds
PATCH 1/1 bitbake: btibake server must reparse the conf between builds
When the UI event handlers are registered, the cooker reset is triggered. In this way it doesn't affect the cooker state.
--- bitbake/lib/bb/server/xmlrpc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
bitbake/lib/bb/server/xmlrpc.py +3 -2
@@ -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
Signature · 1 line
1.7.9.5
Apart from the misspell in the subject, I really like this patch :).
Very creative, simple, straight to the point :)
Alex
On Fri, Nov 29, 2013 at 11:31 AM, Cristiana Voicu <[email protected]
Quoted 37 lines
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 <[email protected]>--- bitbake/lib/bb/server/xmlrpc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)bitbake/lib/bb/server/xmlrpc.py +3
-2@@ -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
--
1.7.9.5_______________________________________________
bitbake-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/bitbake-devel
Quoted 15 lines · Cristiana Voicu
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 <[email protected]>--- bitbake/lib/bb/server/xmlrpc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)bitbake/lib/bb/server/xmlrpc.py +0
-0@@ -103,8 +103,9 @@ class BitBakeServerCommands(): for f in featureset:
bitbake/lib/bb/server/xmlrpc.py class BitBakeServerCommands(): · line 111
Quoted 10 lines
bitbake/lib/bb/server/xmlrpc.py +3
-2self.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