summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-12-19 12:39:42 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-06 10:13:57 +0000
commit8cdfa5fb1110df76797eb7a06d607977954164bd (patch)
tree8c186de1e160409c1da4d4ded5dcb6d13b506c91 /meta
parent20650708b012bde1bbd6e4f1f5f7e9e93d1794c0 (diff)
downloadpoky-8cdfa5fb1110df76797eb7a06d607977954164bd.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: a66bf18b35a6ebbad7c821512cdf5969f72d6844) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0f537d985b7b17af508a511fca8a4ec4b5804580) Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/rm_work.bbclass6
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)