All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] runqueue: Ensure we do run 'masked' setscene tasks if specified as targets
@ 2014-02-13 15:01 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2014-02-13 15:01 UTC (permalink / raw)
  To: bitbake-devel

If you specify multiple targets on bitbake's commandline and some of them are
setscene tasks which are "masked" by other tasks they may not get run.

For example <image>:do_rootfs <kernel>:do_populate_sysroot

the rootfs tasks "masks" the populate_sysroot task so bitbake would currently
decide not to run it. In this case, we do really want it to be run.

The fix is not to skip anything which has been given as an explict target.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index a83fc6a..2475fd1 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -1899,10 +1899,18 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
                     if nexttask in self.unskippable:
                         logger.debug(2, "Setscene task %s is unskippable" % self.rqdata.get_user_idstring(self.rqdata.runq_setscene[nexttask]))                      
                     if nexttask not in self.unskippable and len(self.sq_revdeps[nexttask]) > 0 and self.sq_revdeps[nexttask].issubset(self.scenequeue_covered) and self.check_dependencies(nexttask, self.sq_revdeps[nexttask], True):
-                        logger.debug(2, "Skipping setscene for task %s" % self.rqdata.get_user_idstring(self.rqdata.runq_setscene[nexttask]))
-                        self.task_skip(nexttask)
-                        self.scenequeue_notneeded.add(nexttask)
-                        return True
+                        realtask = self.rqdata.runq_setscene[nexttask]
+                        fn = self.rqdata.taskData.fn_index[self.rqdata.runq_fnid[realtask]]
+                        target = False
+                        for target in self.rqdata.target_pairs:
+                            if target[0] == fn and target[1] == self.rqdata.runq_task[realtask]:
+                                target = True
+                                break
+                        if not target:
+                            logger.debug(2, "Skipping setscene for task %s" % self.rqdata.get_user_idstring(self.rqdata.runq_setscene[nexttask]))
+                            self.task_skip(nexttask)
+                            self.scenequeue_notneeded.add(nexttask)
+                            return True
                     task = nexttask
                     break
         if task is not None:




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-02-13 15:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-13 15:01 [PATCH] runqueue: Ensure we do run 'masked' setscene tasks if specified as targets Richard Purdie

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.