diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-12-19 12:39:42 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-12-21 10:21:00 +0000 |
| commit | 19b61c8cc62bd9c5b0205e94e397699c72203cd4 (patch) | |
| tree | d593ea4688c179ffbfbfd6f5545e4f829b2b666b /meta/classes/rm_work.bbclass | |
| parent | dbea61d086973d08be0bca73159bcc3b1bec26a8 (diff) | |
| download | poky-19b61c8cc62bd9c5b0205e94e397699c72203cd4.tar.gz | |
rm_work: Handle race with -inital tasks
There is a race with rm_work when tasks run deltask do_build since
do_rm_work becomes a floating task. Handle this by injecting
the populate_sysroot/lic dependencies manually if the tasks returned
are empty. This depends on a change to fix bb.build.preceedtask() in
bitbake too.
[YOCTO #12365]
(From OE-Core rev: 0f537d985b7b17af508a511fca8a4ec4b5804580)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/rm_work.bbclass')
| -rw-r--r-- | meta/classes/rm_work.bbclass | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/rm_work.bbclass b/meta/classes/rm_work.bbclass index 13a9e75d85..59180829ab 100644 --- a/meta/classes/rm_work.bbclass +++ b/meta/classes/rm_work.bbclass | |||
| @@ -166,6 +166,10 @@ python inject_rm_work() { | |||
| 166 | deps = set(bb.build.preceedtask('do_build', True, d)) | 166 | deps = set(bb.build.preceedtask('do_build', True, d)) |
| 167 | deps.difference_update(('do_build', 'do_rm_work_all')) | 167 | deps.difference_update(('do_build', 'do_rm_work_all')) |
| 168 | 168 | ||
| 169 | # deps can be empty if do_build doesn't exist, e.g. *-inital recipes | ||
| 170 | if not deps: | ||
| 171 | deps = ["do_populate_sysroot", "do_populate_lic"] | ||
| 172 | |||
| 169 | if pn in excludes: | 173 | if pn in excludes: |
| 170 | d.delVarFlag('rm_work_rootfs', 'cleandirs') | 174 | d.delVarFlag('rm_work_rootfs', 'cleandirs') |
| 171 | d.delVarFlag('rm_work_populatesdk', 'cleandirs') | 175 | d.delVarFlag('rm_work_populatesdk', 'cleandirs') |
| @@ -179,6 +183,8 @@ python inject_rm_work() { | |||
| 179 | # work in the recipe itself. | 183 | # work in the recipe itself. |
| 180 | # In practice, addtask() here merely updates the dependencies. | 184 | # In practice, addtask() here merely updates the dependencies. |
| 181 | bb.build.addtask('do_rm_work', 'do_build', ' '.join(deps), d) | 185 | bb.build.addtask('do_rm_work', 'do_build', ' '.join(deps), d) |
| 186 | if "initial" in pn: | ||
| 187 | bb.warn(pn + "2: " + " ".join(deps)) | ||
| 182 | 188 | ||
| 183 | # Always update do_build_without_rm_work dependencies. | 189 | # Always update do_build_without_rm_work dependencies. |
| 184 | bb.build.addtask('do_build_without_rm_work', '', ' '.join(deps), d) | 190 | bb.build.addtask('do_build_without_rm_work', '', ' '.join(deps), d) |
