From ad66cd521d3e661dd57c5aa02c204585101984f3 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Mon, 31 Mar 2014 17:39:18 +0100 Subject: sstate.bbclass: update missed sstate event This is a patch to update the missed sstate event with info about the sstate files locations that were found. It's needed as to display the found file in the toaster ui. Also fixes a bug where a setscene task may have appeared in the missed list even if it was found in a sstate mirror. Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- meta/classes/sstate.bbclass | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'meta/classes') diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 25b8d72633..f761909f3d 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass @@ -690,6 +690,8 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d): fetcher.checkstatus() bb.debug(2, "SState: Successful fetch test for %s" % srcuri) ret.append(task) + if task in missed: + missed.remove(task) except: missed.append(task) bb.debug(2, "SState: Unsuccessful fetch test for %s" % srcuri) @@ -697,9 +699,15 @@ def sstate_checkhashes(sq_fn, sq_task, sq_hash, sq_hashfn, d): inheritlist = d.getVar("INHERIT", True) if "toaster" in inheritlist: - evdata = [] + evdata = {'missed': [], 'found': []}; for task in missed: - evdata.append( (sq_fn[task], sq_task[task], sq_hash[task], generate_sstatefn(spec, sq_hash[task],d) ) ) + spec, extrapath, tname = getpathcomponents(task, d) + sstatefile = d.expand(extrapath + generate_sstatefn(spec, sq_hash[task], d) + "_" + tname + ".tgz") + evdata['missed'].append( (sq_fn[task], sq_task[task], sq_hash[task], sstatefile ) ) + for task in ret: + spec, extrapath, tname = getpathcomponents(task, d) + sstatefile = d.expand(extrapath + generate_sstatefn(spec, sq_hash[task], d) + "_" + tname + ".tgz") + evdata['found'].append( (sq_fn[task], sq_task[task], sq_hash[task], sstatefile ) ) bb.event.fire(bb.event.MetadataEvent("MissedSstate", evdata), d) return ret -- cgit v1.2.3