Patchwork [bitbake-devel] runqueue: Fix sstate task dependency problems

login
register
mail settings
Submitter Richard Purdie
Date March 31, 2014, 10:07 p.m.
Message ID <1396303640.14790.85.camel@ted>
Download mbox | patch
Permalink /patch/69755/
State New
Headers show

Comments

Richard Purdie - March 31, 2014, 10:07 p.m.
If a setscene task has [depends], its possible they may still get executed out
of order. The issue is that the dependencies are set to set() for all tasks
involved. This patch adds back in explict dependencies within these chains
to avoid the setscene task failures.

[YOCTO #6069]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
Robert Yang - April 1, 2014, 1:46 a.m.
Cool, it works well now.

Tested-by: Robert Yang <liezhi.yang@windriver.com>

// Robert


On 04/01/2014 06:07 AM, Richard Purdie wrote:
> If a setscene task has [depends], its possible they may still get executed out
> of order. The issue is that the dependencies are set to set() for all tasks
> involved. This patch adds back in explict dependencies within these chains
> to avoid the setscene task failures.
>
> [YOCTO #6069]
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
> index 42b6c48..1a19677 100644
> --- a/bitbake/lib/bb/runqueue.py
> +++ b/bitbake/lib/bb/runqueue.py
> @@ -1757,6 +1757,10 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
>                       # Have to zero this to avoid circular dependencies
>                       sq_revdeps_squash[self.rqdata.runq_setscene.index(taskid)] = set()
>
> +        for task in self.sq_harddeps:
> +             for dep in self.sq_harddeps[task]:
> +                 sq_revdeps_squash[dep].add(task)
> +
>           #for task in xrange(len(sq_revdeps_squash)):
>           #    realtask = self.rqdata.runq_setscene[task]
>           #    bb.warn("Task %s: %s_setscene is %s " % (task, self.rqdata.get_user_idstring(realtask) , sq_revdeps_squash[task]))
>
>

Patch

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 42b6c48..1a19677 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1757,6 +1757,10 @@  class RunQueueExecuteScenequeue(RunQueueExecute):
                     # Have to zero this to avoid circular dependencies
                     sq_revdeps_squash[self.rqdata.runq_setscene.index(taskid)] = set()
 
+        for task in self.sq_harddeps:
+             for dep in self.sq_harddeps[task]:
+                 sq_revdeps_squash[dep].add(task)
+
         #for task in xrange(len(sq_revdeps_squash)):
         #    realtask = self.rqdata.runq_setscene[task]
         #    bb.warn("Task %s: %s_setscene is %s " % (task, self.rqdata.get_user_idstring(realtask) , sq_revdeps_squash[task]))