Bug 12819

Summary: build using selected bitbake env, not Toaster's env
Product: [Build System, Metadata & Runtime] Toaster Reporter: David Reyna <david.reyna>
Component: toasterAssignee: David Reyna <david.reyna>
Status: RESOLVED FIXED QA Contact: Toaster default assignee <toaster>
Severity: normal    
Priority: Medium+ CC: jessica.zhang, stanciux.mihail
Version: unspecified   
Target Milestone: 2.6 M3   
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 2018-06-28 00:36:51 UTC
When building projects, pre-clean the environment of Toaster's bitbake environment so that the build will use the selected bitbake (per release) environment.

With this error, there are collisions between mismatches of the versions of the host bitbake versus the build bitbake, in addition to mismatches in custom environment settings.

Proposed solution:

        git_env = os.environ.copy()
        # (note: add custom environment settings here)
        try:
            # insure that the project init/build uses the selected bitbake, and not Toaster's
            del git_env['TEMPLATECONF']
            del git_env['BBBASEDIR']
            del git_env['BUILDDIR']
        except KeyError:
            pass

... and ...

            self._shellcmd("bash -c 'source %s %s'" % (oe_init, builddir),
                       self.be.sourcedir,env=git_env)
Comment 1 David Reyna 2018-08-26 05:58:34 UTC
commit 08fbdc02e32d715ae94e3b9603fb3ec8351c8fd3