Bug 12363

Summary: unset BBPATH before starting bbserver for Rocko compatibility
Product: [Build System, Metadata & Runtime] Toaster Reporter: David Reyna <david.reyna>
Component: toasterAssignee: David Reyna <david.reyna>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: jessica.zhang, richard.purdie, stanciux.mihail
Version: 2.4.1   
Target Milestone: 2.4.1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description David Reyna 2017-11-18 06:40:41 UTC
In Rocko and before, the BBPATH is not set when sourcing a build environment. However, a recent change in master has changed that.

This results in a Toaster failure when attempting to build a Rocko project with a Toaster from master, because a side effect of the unexpected inheritance of BBPATH is that when the bbserver is started with the Rocko bitbake the "bitbake.lock" file is created in the Toaster build directory instead of the respective build directory.

The resolution is to always unset BBPATH before starting the bbserver. This is forward and backwards compatible.

For example, if Toaster was started from Rocko, it can build both Rocko (because BBPATH was not set) and master projects (because BBPATH will be set by the new environment).