summaryrefslogtreecommitdiffstats
path: root/meta/classes/sstate.bbclass
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-08 09:57:23 +0100
commite769dce794a4724e1bcfdd61652ec54d9520c29f (patch)
tree543e8c23d9550030ee71f420480bb4429aab1775 /meta/classes/sstate.bbclass
parent40712171b2072171ae878de4889faa7be842451d (diff)
downloadpoky-e769dce794a4724e1bcfdd61652ec54d9520c29f.tar.gz
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]. (From OE-Core rev: 1a064385d6921ec90b33c9064dafaab11a36267c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-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 994eae6eaa..4e81fc925d 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):
800 except: 800 except:
801 missed.append(task) 801 missed.append(task)
802 bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri) 802 bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri)
803 pass 803 pass
804 bb.event.fire(bb.event.ProcessProgress("Checking sstate mirror object availability", len(tasklist) - thread_worker.tasks.qsize()), d)
804 805
805 tasklist = [] 806 tasklist = []
806 for task in range(len(sq_fn)): 807 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):
811 tasklist.append((task, sstatefile)) 812 tasklist.append((task, sstatefile))
812 813
813 if tasklist: 814 if tasklist:
814 bb.note("Checking sstate mirror object availability (for %s objects)" % len(tasklist)) 815 bb.event.fire(bb.event.ProcessStarted("Checking sstate mirror object availability", len(tasklist)), d)
815 import multiprocessing 816 import multiprocessing
816 nproc = min(multiprocessing.cpu_count(), len(tasklist)) 817 nproc = min(multiprocessing.cpu_count(), len(tasklist))
817 818
@@ -821,6 +822,7 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
821 pool.add_task(checkstatus, t) 822 pool.add_task(checkstatus, t)
822 pool.start() 823 pool.start()
823 pool.wait_completion() 824 pool.wait_completion()
825 bb.event.fire(bb.event.ProcessFinished("Checking sstate mirror object availability"), d)
824 826
825 inheritlist = d.getVar("INHERIT", True) 827 inheritlist = d.getVar("INHERIT", True)
826 if "toaster" in inheritlist: 828 if "toaster" in inheritlist: