[Toaster] RFC: ed/toaster/misc
Ed Bartosh
ed.bartosh at linux.intel.com
Sun Jul 19 09:12:22 PDT 2015
Hi reviewers,
This set of changes was started as a fix for YOCTO #7914.
The idea was to reimplement SSH BE controller in a way that
it generates shell script and runs it on remote using ssh.
This was implemented by commits up to bdbe7208.
Then I realized that the same approach can be used for local
builds and most of the code I've written can be reused.
The only difference between local and SSH controllers is
the way how an access to shell is obtained.
So, I went further and used my implementation as a base
controller. I also cleaned up a code a bit along the way.
Currenly the code is not ready to be merged yet, but it's in
working shape. I decided to stop development on this step and
ask you to comment on the work.
Iplementation details:
BuildEnvironmentController API was reduced to ony one call:
triggerBuild. The rest of the API calls are not used outside of
bldcontrol/, so this change doesn't require to change anything
outside of the controller implementation.
triggerBuild API generates shell script from template using Django
template engine and runs it with self.shell. For base class and local
controller self.sh is set to 'sh'. For ssh controller it's set to
'ssh <remote host>'. The script clones bitbake and layers, runs bitbake
with -w command line option and prints bitbake events to the stdout.
Controller dynamically reads events and pushes them to Toaster UI.
Advantages of this approach:
- The same implementation is used for both local and ssh controllers
- API is simple and contains less code
- No memres bitbake is needed
Disadvantages:
- It's quite big change in important area. Some testing is needed
before pushing it to upstream
- Debugging could be more difficult as part of the code executed
as a shell script
Please, review and comment.
--
Regards,
Ed
More information about the toaster
mailing list