Bug 9002

Summary: Move directory scan logic out of toaster.bbclass into buildinfohelper
Product: [Build System, Metadata & Runtime] Toaster Reporter: Elliot Smith <elliot.smith>
Component: toasterAssignee: Elliot Smith <elliot.smith>
Status: RESOLVED FIXED QA Contact: Libertad <libertad.gonzalez.de.la.cruz>
Severity: enhancement    
Priority: Low CC: belen.barros.pena, jessica.zhang, stanciux.mihail
Version: unspecified   
Target Milestone: 2.2 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Elliot Smith 2016-01-26 10:42:06 UTC
When a build completes, toaster.bbclass scans the tmp/deploy directory for SDK artifacts and image files. We then fire events which represent the files we found. This means that toaster.bbclass has quite a bit of logic in it about what Toaster is looking for, in terms of file locations etc.

The problem with this is that Toaster runs its own "local" bitbake, using metadata from the appropriate Yocto branch; and that metadata contains toaster.bbclass. This means that Toaster may be out of sync with toaster.bbclass. So, for example, we might be running a version of bitbake (via Toaster) which puts SDK artifacts in tmp/deploy/sdk; while the "metadata" we're using is expecting a different directory structure like tmp/work/deploy.

Note that bitbake supplies a consistent SDK_DEPLOY variable representing the top directory containing the SDK artifacts; but our toaster.bbclass makes additional assumptions about the locations of files under that directory.

Moving the processing out of toaster.bbclass will make it more declarative, so that we aren't in so much danger of breaking the contract between buildinfohelper and toaster.bbclass.

Ideally, the interface between buildinfohelper and toaster.bbclass should be reduced to simple events indicating when the build has finished, when images are created, when and where the SDK artifacts are built etc. These should contain minimal relevant data (e.g. directory paths, file names) which are otherwise cumbersome for Toaster to access.
Comment 1 Elliot Smith 2016-07-01 14:55:09 UTC
This was done as part of the work for bug 8556.