summaryrefslogtreecommitdiffstats
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
authorJose Quaresma <quaresma.jose@gmail.com>2021-11-09 11:11:46 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-11-16 22:19:47 +0000
commit18e7a77aa1626e11820804ad64b86a32f97da2ca (patch)
tree48bc04e6b1e70ec7cd004c7c191b9897e40810dd /meta/classes/sstate.bbclass
parent8e8b24e7c557b436b5956081c5830f9fef6a02d4 (diff)
downloadopenembedded-core-18e7a77aa1626e11820804ad64b86a32f97da2ca.tar.gz
sstate: cleanup the sstate mirror progress check
We only have the progress bar when there are more than 100 objects. So we can check for this and store the result to show the progress bar. Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass9
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 849723d4dc..3f6a1fe99f 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -996,11 +996,11 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True,
bb.debug(2, "SState: Unsuccessful fetch test for %s (%s)" % (srcuri, e))
except Exception as e:
bb.error("SState: cannot test %s: %s" % (srcuri, e))
- if len(tasklist) >= min_tasks:
+
+ if progress:
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
@@ -1011,7 +1011,8 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True,
if tasklist:
nproc = min(int(d.getVar("BB_NUMBER_THREADS")), len(tasklist))
- if len(tasklist) >= min_tasks:
+ progress = len(tasklist) >= 100
+ if progress:
msg = "Checking sstate mirror object availability"
bb.event.fire(bb.event.ProcessStarted(msg, len(tasklist)), d)
@@ -1024,7 +1025,7 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True,
pool.wait_completion()
bb.event.disable_threadlock()
- if len(tasklist) >= min_tasks:
+ if progress:
bb.event.fire(bb.event.ProcessFinished(msg), d)
inheritlist = d.getVar("INHERIT")