diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2017-03-29 13:29:50 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-31 10:10:29 +0100 |
commit | caf1c9087161838903c0e9d2971cc8bfabfdebd0 (patch) | |
tree | 0b70f82f3fd87202e5fa4347681dc84e6ef30eaf /meta/classes | |
parent | d83e16a99ccc53d1e30ec934be431dcb932563f9 (diff) | |
download | poky-caf1c9087161838903c0e9d2971cc8bfabfdebd0.tar.gz |
populate_sdk_ext.bbclass: enhance compatibility with rm_work.bbclass
"bitbake -c populate_dsk_ext" must not trigger do_rm_work, because it
is impossible to declare that the additional tasks activated by "-c
populate_dsk_ext" must run before do_rm_work. When do_populate_dsk_ext
and do_rm_work are both active, the resulting race condition breaks
do_populate_dsk_ext.
The existing bitbake dependencies can't be used for that, because
"addtask populate_dsk_ext before do_rm_work" would then always execute
populate_dsk_ext also in normal builds.
do_populate_dsk_ext triggers do_rm_work indirectly through the
dependency on do_build of the SDK_TARGETs. Using the new
do_build_without_rm_work instead (when available, with do_build as
before if not) avoids the problem.
However, one has to be careful to not trigger do_rm_work in the same
build in some other way. "bitbake core-image-sato:do_populate_sdk_ext
core-image-sato:do_build" still fails, for example. Doing one after
the other works.
Fixes: [YOCTO 11042]
(From OE-Core rev: 00b1911c65fa1b21c3dedec40170998573b62178)
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/populate_sdk_ext.bbclass | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index 3bccb142e6..db822bf771 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass | |||
@@ -656,7 +656,12 @@ do_populate_sdk_ext[depends] = "${@d.getVarFlag('do_populate_sdk', 'depends', Fa | |||
656 | ${@'meta-world-pkgdata:do_collect_packagedata' if d.getVar('SDK_INCLUDE_PKGDATA') == '1' else ''} \ | 656 | ${@'meta-world-pkgdata:do_collect_packagedata' if d.getVar('SDK_INCLUDE_PKGDATA') == '1' else ''} \ |
657 | ${@'meta-extsdk-toolchain:do_locked_sigs' if d.getVar('SDK_INCLUDE_TOOLCHAIN') == '1' else ''}" | 657 | ${@'meta-extsdk-toolchain:do_locked_sigs' if d.getVar('SDK_INCLUDE_TOOLCHAIN') == '1' else ''}" |
658 | 658 | ||
659 | do_populate_sdk_ext[rdepends] += "${@' '.join([x + ':do_build' for x in d.getVar('SDK_TARGETS').split()])}" | 659 | # We must avoid depending on do_build here if rm_work.bbclass is active, |
660 | # because otherwise do_rm_work may run before do_populate_sdk_ext itself. | ||
661 | # We can't mark do_populate_sdk_ext and do_sdk_depends as having to | ||
662 | # run before do_rm_work, because then they would also run as part | ||
663 | # of normal builds. | ||
664 | do_populate_sdk_ext[rdepends] += "${@' '.join([x + ':' + (d.getVar('RM_WORK_BUILD_WITHOUT') or 'do_build') for x in d.getVar('SDK_TARGETS').split()])}" | ||
660 | 665 | ||
661 | # Make sure code changes can result in rebuild | 666 | # Make sure code changes can result in rebuild |
662 | do_populate_sdk_ext[vardeps] += "copy_buildsystem \ | 667 | do_populate_sdk_ext[vardeps] += "copy_buildsystem \ |