mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02:00
sstate.bbclass: Only show sstate mirror progress bar for >= 100 objects
With the introduction of the hash equivalence server, the progress bar for "Checking sstate mirror object availability" is shown repeatedly. Most of the times the number of objects scanned is very low and the progress bar completes almost immediately. To avoid all these unnecessary progress bars, set the minimum number of objects to 100 before the progress bar is shown. (From OE-Core rev: 114340e8d393cf60d0a596cb0800cf1b7fd198df) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
58a6955820
commit
1444b8a2ae
|
@ -934,9 +934,11 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True,
|
|||
missed.add(tid)
|
||||
bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri)
|
||||
pass
|
||||
bb.event.fire(bb.event.ProcessProgress(msg, len(tasklist) - thread_worker.tasks.qsize()), d)
|
||||
if len(tasklist) >= min_tasks:
|
||||
bb.event.fire(bb.event.ProcessProgress(msg, len(tasklist) - thread_worker.tasks.qsize()), d)
|
||||
|
||||
tasklist = []
|
||||
min_tasks = 100
|
||||
for tid in sq_data['hash']:
|
||||
if tid in found:
|
||||
continue
|
||||
|
@ -945,8 +947,9 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True,
|
|||
tasklist.append((tid, sstatefile))
|
||||
|
||||
if tasklist:
|
||||
msg = "Checking sstate mirror object availability"
|
||||
bb.event.fire(bb.event.ProcessStarted(msg, len(tasklist)), d)
|
||||
if len(tasklist) >= min_tasks:
|
||||
msg = "Checking sstate mirror object availability"
|
||||
bb.event.fire(bb.event.ProcessStarted(msg, len(tasklist)), d)
|
||||
|
||||
import multiprocessing
|
||||
nproc = min(multiprocessing.cpu_count(), len(tasklist))
|
||||
|
@ -960,7 +963,8 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True,
|
|||
pool.wait_completion()
|
||||
bb.event.disable_threadlock()
|
||||
|
||||
bb.event.fire(bb.event.ProcessFinished(msg), d)
|
||||
if len(tasklist) >= min_tasks:
|
||||
bb.event.fire(bb.event.ProcessFinished(msg), d)
|
||||
|
||||
# Likely checking an individual task hash again for multiconfig sharing of sstate tasks so skip reporting
|
||||
if len(sq_data['hash']) == 1:
|
||||
|
|
Loading…
Reference in New Issue
Block a user