summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2014-03-31 17:39:18 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-31 17:43:44 +0100
commitad66cd521d3e661dd57c5aa02c204585101984f3 (patch)
treefff7adb980490556b7b3370309eaec35efe2f977
parentab0bb02d410e4f0713e75192eb217991b3f672aa (diff)
downloadopenembedded-core-ad66cd521d3e661dd57c5aa02c204585101984f3.tar.gz
openembedded-core-ad66cd521d3e661dd57c5aa02c204585101984f3.tar.bz2
openembedded-core-ad66cd521d3e661dd57c5aa02c204585101984f3.zip
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 <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/sstate.bbclass12
1 files changed, 10 insertions, 2 deletions
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