aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-06-24 00:07:00 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-07 13:29:01 +0100
commit1a064385d6921ec90b33c9064dafaab11a36267c (patch)
treeee44cf9fd4dea099e2cad1bb225535bdbb66b311
parent370f08d434480c1790950e40db8f7687da78cb14 (diff)
downloadopenembedded-core-contrib-1a064385d6921ec90b33c9064dafaab11a36267c.tar.gz
openembedded-core-contrib-1a064385d6921ec90b33c9064dafaab11a36267c.tar.bz2
openembedded-core-contrib-1a064385d6921ec90b33c9064dafaab11a36267c.zip
classes/sstate: show progress during sstate object availability check
Show progress through bitbake's standard terminal UI when checking for shared state object availability, since this can take some time if there are a large number of tasks to be executed and/or the network connection is slow. Part of the implementation for [YOCTO #5853]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/sstate.bbclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 994eae6eaab..4e81fc925df 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -800,7 +800,8 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
except:
missed.append(task)
bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri)
- pass
+ pass
+ bb.event.fire(bb.event.ProcessProgress("Checking sstate mirror object availability", len(tasklist) - thread_worker.tasks.qsize()), d)
tasklist = []
for task in range(len(sq_fn)):
@@ -811,7 +812,7 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
tasklist.append((task, sstatefile))
if tasklist:
- bb.note("Checking sstate mirror object availability (for %s objects)" % len(tasklist))
+ bb.event.fire(bb.event.ProcessStarted("Checking sstate mirror object availability", len(tasklist)), d)
import multiprocessing
nproc = min(multiprocessing.cpu_count(), len(tasklist))
@@ -821,6 +822,7 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
pool.add_task(checkstatus, t)
pool.start()
pool.wait_completion()
+ bb.event.fire(bb.event.ProcessFinished("Checking sstate mirror object availability"), d)
inheritlist = d.getVar("INHERIT", True)
if "toaster" in inheritlist: