[gnome-continuous-yocto/gnomeostree-3.28-rocko: 53/218] rm_work: Handle race with -inital tasks
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 53/218] rm_work: Handle race with -inital tasks
- Date: Mon, 21 May 2018 08:39:41 +0000 (UTC)
commit 8cdfa5fb1110df76797eb7a06d607977954164bd
Author: Richard Purdie <richard purdie linuxfoundation org>
Date: Tue Dec 19 12:39:42 2017 +0000
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>
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 13a9e75..5918082 100644
--- a/meta/classes/rm_work.bbclass
+++ b/meta/classes/rm_work.bbclass
@@ -166,6 +166,10 @@ python inject_rm_work() {
deps = set(bb.build.preceedtask('do_build', True, d))
deps.difference_update(('do_build', 'do_rm_work_all'))
+ # deps can be empty if do_build doesn't exist, e.g. *-inital recipes
+ if not deps:
+ deps = ["do_populate_sysroot", "do_populate_lic"]
+
if pn in excludes:
d.delVarFlag('rm_work_rootfs', 'cleandirs')
d.delVarFlag('rm_work_populatesdk', 'cleandirs')
@@ -179,6 +183,8 @@ python inject_rm_work() {
# work in the recipe itself.
# In practice, addtask() here merely updates the dependencies.
bb.build.addtask('do_rm_work', 'do_build', ' '.join(deps), d)
+ if "initial" in pn:
+ bb.warn(pn + "2: " + " ".join(deps))
# Always update do_build_without_rm_work dependencies.
bb.build.addtask('do_build_without_rm_work', '', ' '.join(deps), d)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]