aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-07 14:24:19 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-07 15:48:10 +0100
commitec037d3e49264037b81212f498d98e292ae7c334 (patch)
tree1fc11a90cd459d9418aef9f274339b15cd91b1b2
parent8e482342c652e298b5f5ea58eda72c5eb14ce2bd (diff)
downloadbitbake-ec037d3e49264037b81212f498d98e292ae7c334.zip
bitbake-ec037d3e49264037b81212f498d98e292ae7c334.tar.gz
bitbake-ec037d3e49264037b81212f498d98e292ae7c334.tar.bz2
runqueue: Allow the hash validate function to have an idea of build completion
There is an oversight in the current hash validation API in that the function can't know how many setscene tasks already completed. Rather than trying to add additional parameters to the function, causing incompatibilities, store the value in the datastore. This is useful to allow build status reporting to the user for figures on sstate reusage and build completion. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/runqueue.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index a43c998..400709c 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -2314,10 +2314,15 @@ class RunQueueExecuteScenequeue(RunQueueExecute):
sq_hash.append(self.rqdata.runtaskentries[tid].hash)
sq_taskname.append(taskname)
sq_task.append(tid)
+
+ self.cooker.data.setVar("BB_SETSCENE_STAMPCURRENT_COUNT", len(stamppresent))
+
call = self.rq.hashvalidate + "(sq_fn, sq_task, sq_hash, sq_hashfn, d)"
locs = { "sq_fn" : sq_fn, "sq_task" : sq_taskname, "sq_hash" : sq_hash, "sq_hashfn" : sq_hashfn, "d" : self.cooker.data }
valid = bb.utils.better_eval(call, locs)
+ self.cooker.data.delVar("BB_SETSCENE_STAMPCURRENT_COUNT")
+
valid_new = stamppresent
for v in valid:
valid_new.append(sq_task[v])