[oe-commits] [bitbake] branch master-next updated: runqueue: Fix non setscene tasks targets being lost
git at git.openembedded.org
git at git.openembedded.org
Wed Jul 17 23:14:56 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository bitbake.
The following commit(s) were added to refs/heads/master-next by this push:
new 75292fd runqueue: Fix non setscene tasks targets being lost
75292fd is described below
commit 75292fdec5d9c0b5b3c554c4b7474a63656f7e12
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed Jul 17 22:46:12 2019 +0100
runqueue: Fix non setscene tasks targets being lost
If you specify both setscene and non-setscene tasks on the commandline, the
non-setscene tasks could be missed, e.g. "bitbake X:do_patch X:do_populate_sysroot"
and do_patch would fail to run.
Fix the problem in runqueue and add a testcase.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/runqueue.py | 10 +++++++++-
lib/bb/tests/runqueue.py | 9 +++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index fa84832..6a2de24 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -2167,7 +2167,6 @@ class RunQueueExecute:
return taskdepdata
def scenequeue_process_notcovered(self, task):
- logger.debug(1, 'Not skipping setscene task %s', task)
if len(self.rqdata.runtaskentries[task].depends) == 0:
self.setbuildable(task)
notcovered = set([task])
@@ -2233,6 +2232,7 @@ class RunQueueExecute:
self.scenequeue_process_unskippable(task)
if task in self.scenequeue_notcovered:
+ logger.debug(1, 'Not skipping setscene task %s', task)
self.scenequeue_process_notcovered(task)
elif task in self.scenequeue_covered:
logger.debug(1, 'Queued setscene task %s', task)
@@ -2243,6 +2243,14 @@ class RunQueueExecute:
logger.debug(1, 'Processing setscene task %s', task)
covered = self.sqdata.sq_covered_tasks[task]
covered.add(task)
+
+ # If a task is in target_tids and isn't a setscene task, we can't skip it.
+ cantskip = covered.intersection(self.rqdata.target_tids).difference(self.rqdata.runq_setscene_tids)
+ for tid in cantskip:
+ self.tasks_notcovered.add(tid)
+ self.scenequeue_process_notcovered(tid)
+ covered.difference_update(cantskip)
+
# Remove notcovered tasks
covered.difference_update(self.tasks_notcovered)
self.tasks_covered.update(covered)
diff --git a/lib/bb/tests/runqueue.py b/lib/bb/tests/runqueue.py
index f0cea64..f22ad4b 100644
--- a/lib/bb/tests/runqueue.py
+++ b/lib/bb/tests/runqueue.py
@@ -97,6 +97,15 @@ class RunQueueTests(unittest.TestCase):
expected = ['a1:fetch', 'a1:unpack', 'a1:patch']
self.assertEqual(set(tasks), set(expected))
+ def test_mix_covered_notcovered(self):
+ with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
+ cmd = ["bitbake", "a1:do_patch", "a1:do_populate_sysroot"]
+ sstatevalid = self.a1_sstatevalid
+ tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid)
+ expected = ['a1:fetch', 'a1:unpack', 'a1:patch', 'a1:populate_sysroot_setscene']
+ self.assertEqual(set(tasks), set(expected))
+
+
# Test targets with intermediate setscene tasks alongside a target with no intermediate setscene tasks
def test_mixed_direct_tasks_setscene_tasks(self):
with tempfile.TemporaryDirectory(prefix="runqueuetest") as tempdir:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list