Bug 12819 - build using selected bitbake env, not Toaster's env
Summary: build using selected bitbake env, not Toaster's env
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:36 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: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