Bug 9002 - Move directory scan logic out of toaster.bbclass into buildinfohelper
Summary: Move directory scan logic out of toaster.bbclass into buildinfohelper
Status: RESOLVED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Low enhancement
Target Milestone: 2.2 M2
Assignee: Elliot Smith
QA Contact: Libertad
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-01-26 10:42 UTC by Elliot Smith
Modified: 2016-07-19 11:09 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.