[PATCH 2/2] sstate: use nproc for tasklist size on mirrors


Jose Quaresma
 

Signed-off-by: Jose Quaresma <quaresma.jose@...>
---
meta/classes/sstate.bbclass | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 5e404d7cd8..9efd334a59 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -997,7 +997,7 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True,
bb.error("SState: cannot test %s: %s" % (srcuri, e))

if progress:
- bb.event.fire(bb.event.ProcessProgress(msg, len(tasklist) - thread_worker.tasks.qsize()), d)
+ bb.event.fire(bb.event.ProcessProgress(msg, nproc - thread_worker.tasks.qsize()), d)

tasklist = []
for tid in missed:
@@ -1007,13 +1007,13 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True,
if tasklist:
nproc = len(tasklist)

- progress = len(tasklist) >= 100
+ progress = nproc >= 100
if progress:
msg = "Checking sstate mirror object availability"
- bb.event.fire(bb.event.ProcessStarted(msg, len(tasklist)), d)
+ bb.event.fire(bb.event.ProcessStarted(msg, nproc), d)

bb.event.enable_threadlock()
- pool = oe.utils.ThreadedPool(nproc, len(tasklist),
+ pool = oe.utils.ThreadedPool(nproc, nproc,
worker_init=checkstatus_init, worker_end=checkstatus_end,
name="sstate_checkhashes-")
for t in tasklist:
--
2.34.1

Join openembedded-core@lists.openembedded.org to automatically receive all group messages.