summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/sstate.bbclass36
1 files changed, 22 insertions, 14 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index e30fbe1280..6e41b56861 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -845,7 +845,7 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
845 missed.append(task) 845 missed.append(task)
846 bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri) 846 bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri)
847 pass 847 pass
848 bb.event.fire(bb.event.ProcessProgress("Checking sstate mirror object availability", len(tasklist) - thread_worker.tasks.qsize()), d) 848 bb.event.fire(bb.event.ProcessProgress(msg, len(tasklist) - thread_worker.tasks.qsize()), d)
849 849
850 tasklist = [] 850 tasklist = []
851 for task in range(len(sq_fn)): 851 for task in range(len(sq_fn)):
@@ -856,7 +856,8 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
856 tasklist.append((task, sstatefile)) 856 tasklist.append((task, sstatefile))
857 857
858 if tasklist: 858 if tasklist:
859 bb.event.fire(bb.event.ProcessStarted("Checking sstate mirror object availability", len(tasklist)), d) 859 msg = "Checking sstate mirror object availability"
860 bb.event.fire(bb.event.ProcessStarted(msg, len(tasklist)), d)
860 861
861 import multiprocessing 862 import multiprocessing
862 nproc = min(multiprocessing.cpu_count(), len(tasklist)) 863 nproc = min(multiprocessing.cpu_count(), len(tasklist))
@@ -870,7 +871,7 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d, siginfo=False):
870 pool.wait_completion() 871 pool.wait_completion()
871 bb.event.disable_threadlock() 872 bb.event.disable_threadlock()
872 873
873 bb.event.fire(bb.event.ProcessFinished("Checking sstate mirror object availability"), d) 874 bb.event.fire(bb.event.ProcessFinished(msg), d)
874 875
875 inheritlist = d.getVar("INHERIT") 876 inheritlist = d.getVar("INHERIT")
876 if "toaster" in inheritlist: 877 if "toaster" in inheritlist:
@@ -1038,18 +1039,25 @@ python sstate_eventhandler2() {
1038 seen.append(stamp) 1039 seen.append(stamp)
1039 1040
1040 if toremove: 1041 if toremove:
1041 bb.note("There are %d recipes to be removed from sysroot %s, removing..." % (len(toremove), a)) 1042 msg = "Removing %d recipes from the %s sysroot" % (len(toremove), a)
1043 bb.event.fire(bb.event.ProcessStarted(msg, len(toremove)), d)
1044
1045 removed = 0
1046 for r in toremove:
1047 (stamp, manifest, workdir) = r.split()
1048 for m in glob.glob(manifest + ".*"):
1049 if m.endswith(".postrm"):
1050 continue
1051 sstate_clean_manifest(m, d)
1052 bb.utils.remove(stamp + "*")
1053 if removeworkdir:
1054 bb.utils.remove(workdir, recurse = True)
1055 lines.remove(r)
1056 removed = removed + 1
1057 bb.event.fire(bb.event.ProcessProgress(msg, removed), d)
1058
1059 bb.event.fire(bb.event.ProcessFinished(msg), d)
1042 1060
1043 for r in toremove:
1044 (stamp, manifest, workdir) = r.split()
1045 for m in glob.glob(manifest + ".*"):
1046 if m.endswith(".postrm"):
1047 continue
1048 sstate_clean_manifest(m, d)
1049 bb.utils.remove(stamp + "*")
1050 if removeworkdir:
1051 bb.utils.remove(workdir, recurse = True)
1052 lines.remove(r)
1053 with open(i, "w") as f: 1061 with open(i, "w") as f:
1054 for l in lines: 1062 for l in lines:
1055 f.write(l) 1063 f.write(l)