All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] runqueue: Fix setscene tasks not running
@ 2014-08-27 12:07 Richard Purdie
  2014-08-27 15:38 ` Robert Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2014-08-27 12:07 UTC (permalink / raw)
  To: bitbake-devel

Currently, if you have hard dependencies between setscene tasks (like avahi on
base-passwd through useradd.bbclass), other dependencies may not be installed
even if these exist in sstate. For example, avahi -> expat -> pigz-native
(and avahi -> base-passwd) yet if you cleansstate base-passwd:

bitbake gzip-native:do_clean avahi:do_clean expat:do_clean pigz-native:do_clean base-passwd:do_cleansstate
bitbake avahi | tee

you will currently see pigz-native being rebuilt even though it was in
sstate. The fix for this is to continue to iterate dependency chains
around hard blocked dependencies as per this patch.

After this patch is applied, you will see pigz-native installed from sstate.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index e13dc57..e32f81a 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1844,6 +1844,10 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
                 realtask = self.rqdata.runq_setscene[task]
                 realdep = self.rqdata.runq_setscene[dep]
                 logger.debug(2, "%s was unavailable and is a hard dependency of %s so skipping" % (self.rqdata.get_user_idstring(realtask), self.rqdata.get_user_idstring(realdep)))
+                self.scenequeue_updatecounters(dep, fail)
+                continue
+            if task not in self.sq_revdeps2[dep]:
+                # May already have been removed by the fail case above
                 continue
             self.sq_revdeps2[dep].remove(task)
             if len(self.sq_revdeps2[dep]) == 0:




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] runqueue: Fix setscene tasks not running
  2014-08-27 12:07 [PATCH] runqueue: Fix setscene tasks not running Richard Purdie
@ 2014-08-27 15:38 ` Robert Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2014-08-27 15:38 UTC (permalink / raw)
  To: bitbake-devel


Thank you very much, I tested it again, it worked well.

// Robert

On 08/27/2014 08:07 PM, Richard Purdie wrote:
> Currently, if you have hard dependencies between setscene tasks (like avahi on
> base-passwd through useradd.bbclass), other dependencies may not be installed
> even if these exist in sstate. For example, avahi -> expat -> pigz-native
> (and avahi -> base-passwd) yet if you cleansstate base-passwd:
>
> bitbake gzip-native:do_clean avahi:do_clean expat:do_clean pigz-native:do_clean base-passwd:do_cleansstate
> bitbake avahi | tee
>
> you will currently see pigz-native being rebuilt even though it was in
> sstate. The fix for this is to continue to iterate dependency chains
> around hard blocked dependencies as per this patch.
>
> After this patch is applied, you will see pigz-native installed from sstate.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
> index e13dc57..e32f81a 100644
> --- a/bitbake/lib/bb/runqueue.py
> +++ b/bitbake/lib/bb/runqueue.py
> @@ -1844,6 +1844,10 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
>                   realtask = self.rqdata.runq_setscene[task]
>                   realdep = self.rqdata.runq_setscene[dep]
>                   logger.debug(2, "%s was unavailable and is a hard dependency of %s so skipping" % (self.rqdata.get_user_idstring(realtask), self.rqdata.get_user_idstring(realdep)))
> +                self.scenequeue_updatecounters(dep, fail)
> +                continue
> +            if task not in self.sq_revdeps2[dep]:
> +                # May already have been removed by the fail case above
>                   continue
>               self.sq_revdeps2[dep].remove(task)
>               if len(self.sq_revdeps2[dep]) == 0:
>
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-27 15:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-27 12:07 [PATCH] runqueue: Fix setscene tasks not running Richard Purdie
2014-08-27 15:38 ` Robert Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.