summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorPeter Kjellerstedt <pkj@axis.com>2020-01-11 04:28:43 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-27 16:48:08 +0000
commit1444b8a2ae226829e719d3d184fca27e5940ae0d (patch)
treef3b9f20ec4fef6ac8203ef95c83538de87f48487 /meta/classes
parent58a695582051a69d7f942a88fa6a6c44d61d7b38 (diff)
downloadpoky-1444b8a2ae226829e719d3d184fca27e5940ae0d.tar.gz
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>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sstate.bbclass12
1 files changed, 8 insertions, 4 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index b4ffffcd98..faa6470450 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -934,9 +934,11 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True,
934 missed.add(tid) 934 missed.add(tid)
935 bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri) 935 bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri)
936 pass 936 pass
937 bb.event.fire(bb.event.ProcessProgress(msg, len(tasklist) - thread_worker.tasks.qsize()), d) 937 if len(tasklist) >= min_tasks:
938 bb.event.fire(bb.event.ProcessProgress(msg, len(tasklist) - thread_worker.tasks.qsize()), d)
938 939
939 tasklist = [] 940 tasklist = []
941 min_tasks = 100
940 for tid in sq_data['hash']: 942 for tid in sq_data['hash']:
941 if tid in found: 943 if tid in found:
942 continue 944 continue
@@ -945,8 +947,9 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True,
945 tasklist.append((tid, sstatefile)) 947 tasklist.append((tid, sstatefile))
946 948
947 if tasklist: 949 if tasklist:
948 msg = "Checking sstate mirror object availability" 950 if len(tasklist) >= min_tasks:
949 bb.event.fire(bb.event.ProcessStarted(msg, len(tasklist)), d) 951 msg = "Checking sstate mirror object availability"
952 bb.event.fire(bb.event.ProcessStarted(msg, len(tasklist)), d)
950 953
951 import multiprocessing 954 import multiprocessing
952 nproc = min(multiprocessing.cpu_count(), len(tasklist)) 955 nproc = min(multiprocessing.cpu_count(), len(tasklist))
@@ -960,7 +963,8 @@ def sstate_checkhashes(sq_data, d, siginfo=False, currentcount=0, summary=True,
960 pool.wait_completion() 963 pool.wait_completion()
961 bb.event.disable_threadlock() 964 bb.event.disable_threadlock()
962 965
963 bb.event.fire(bb.event.ProcessFinished(msg), d) 966 if len(tasklist) >= min_tasks:
967 bb.event.fire(bb.event.ProcessFinished(msg), d)
964 968
965 # Likely checking an individual task hash again for multiconfig sharing of sstate tasks so skip reporting 969 # Likely checking an individual task hash again for multiconfig sharing of sstate tasks so skip reporting
966 if len(sq_data['hash']) == 1: 970 if len(sq_data['hash']) == 1: