Bug 12820 - Toaster randomizes the layer order in toaster_bblayers.conf
Summary: Toaster randomizes the layer order in toaster_bblayers.conf
Status: RESOLVED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.6 M3
Assignee: David Reyna
QA Contact: Toaster default assignee
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2018-06-28 00:45 UTC by David Reyna
Modified: 2018-08-26 05:58 UTC (History)
2 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 David Reyna 2018-06-28 00:45:01 UTC
In the file 'localhostbecontroller.py' (method 'setLayers'), the order of the layers passed in gets randomized by the code that checks out the layer repositories, because a dictionary is used in that processing.

In turn, the resulting randomized order of the layers is then used to populate the bblayers.

Normally this is not an issue, since bitbake will attempt to accomodate any layer order via layer priority. However, it there is a layer that does depend on its placement (by design or by weakness), then that layer can intermittently fall in a bad position and fail the build.

Proposed solution:

Add a layer sequence number to the dictionary's objects to allow a sort after the cloning (and sub-layer discovery) and before the bblayer file generation is performed.
Comment 1 David Reyna 2018-08-26 05:58:54 UTC
commit 08fbdc02e32d715ae94e3b9603fb3ec8351c8fd3