Hi,
On Fri, Dec 18, 2015 at 7:16 PM, Ed Bartosh <[email protected]>
wrote:
> Hi Sujith,
>
> Can you split your changes please?
> I'd suggest to at least separate backend changes from frontend ones.
>
> Having uihelper.py changes in a separate commit would be nice too.
> It looks like you've spotted correctly that findServerDetails is not
> used anywhere in bitbake code. You can remove it in a separate commit as
> it looks unrelated to the rest of the patch.
>
> +1 for Michael's suggestion to use build controller.
>
The problem I see using build controller is:
I have tried with the build controller approach earlier and below are my
findings:
Lets say if I try to use getBuildEnvironmentController function as:
localhostbctrl = localhostbecontroller.LocalhostBEController(be) # in
toastergui/views.py
localhostbctrl.getBBController()
Then the failure starts when the control reaches function startBBServer
and the initial assert fails.
Even if I try to add a wrapper function known as cancelBuild in
bbcontroller.py:
def conncetToServer(self):
server = bb.server.xmlrpc.BitBakeXMLRPCClient()
server.initServer()
server.saveConnectionDetails("%s:%s" % (self.be.bbaddress,
self.be.bbport))
self.connection = server.establishConnection([])
self.be.bbtoken = self.connection.transport.connection_token
self.be.save()
return BitbakeController(self.connection)
This would fail in server.establishConnection line. Because internally it
does call connect function in xmlrpc.py which does call
uievent.BBUIEventQueue. This call causes exception, because in
registerEventHandler function there is a line:
if (self.cooker.state in [bb.cooker.state.parsing,
bb.cooker.state.running]):
I couldn't tackle this situation and that is the reason why I opted for
another approach from uihelper's function findServerDetails.
Is there any other way using which I can tackle this situation from
bbcontroller.py? As per my investigation the problem bubbles around with
registerEventHandler function with this approach.
Thanks,
Sujith H
> On Thu, Dec 17, 2015 at 10:26:11PM +0530, sujith h wrote:
> > Hi,
> >
> > I have posted my changes in:
> >
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=sujith/toaster-build-cancel
> >
> > Kindly review my changes and let me know if I have to make changes. I
> would
> > be happy to do so.
> >
> > Thanks for all helping hand from RP, Ed, Michael, Belen and Paul.
> >
> > Thanks,
> > Sujith H
>
> --
> Regards,
> Ed
>
--
സുജിത് ഹരിദാസന്
Bangalore
<Project>Contributor to KDE project
http://fci.wikia.com/wiki/Anti-DRM-Campaign
<Blog> http://sujithh.info
--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster