diff options
-rw-r--r-- | meta/classes/sstate.bbclass | 12 |
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: |