summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorDexuan Cui <dexuan.cui@intel.com>2011-04-07 17:38:17 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-04-08 06:14:54 -0700
commit7ddc746e5af70b4a96e7f49e82cb7520cf89d331 (patch)
treef0a2ccf541970211ee8b9e94f0c13cd0e4566957 /meta
parente5a40cd6f8c6a8c3d40cbaf29bffe5e201056dad (diff)
downloadpoky-7ddc746e5af70b4a96e7f49e82cb7520cf89d331.tar.gz
sstate: ensure an ordered mapping between SSTATETASKS and SSTATETASKNAMES
Fix [YOCTO #964] A recent commit 25a6e5f9(sstate: use only unique set of SSTATETASK) breaks the ordered mapping between SSTATETASKS and SSTATETASKNAMES. As a result, in sstate_cleanall, the line taskname = tasks[namemap.index(name)] gets an incorrect result, and "bitbake -c cleanall" doesn't really remove the files populalted by do_populate_sysroot. (From OE-Core rev: 2f6505f0e795b6c8cad641a6918739c3faac1f99) Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/sstate.bbclass6
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index cc0b8665f6..be650c4af4 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -39,8 +39,10 @@ python () {
39 scan_cmd = "grep -Irl ${STAGING_DIR} ${SSTATE_BUILDDIR}" 39 scan_cmd = "grep -Irl ${STAGING_DIR} ${SSTATE_BUILDDIR}"
40 bb.data.setVar('SSTATE_SCAN_CMD', scan_cmd, d) 40 bb.data.setVar('SSTATE_SCAN_CMD', scan_cmd, d)
41 41
42 unique_tasks = set((bb.data.getVar('SSTATETASKS', d, True) or "").split())
43 d.setVar('SSTATETASKS', " ".join(unique_tasks))
42 namemap = [] 44 namemap = []
43 for task in set((bb.data.getVar('SSTATETASKS', d, True) or "").split()): 45 for task in unique_tasks:
44 namemap.append(bb.data.getVarFlag(task, 'sstate-name', d)) 46 namemap.append(bb.data.getVarFlag(task, 'sstate-name', d))
45 funcs = bb.data.getVarFlag(task, 'prefuncs', d) or "" 47 funcs = bb.data.getVarFlag(task, 'prefuncs', d) or ""
46 funcs = "sstate_task_prefunc " + funcs 48 funcs = "sstate_task_prefunc " + funcs
@@ -200,7 +202,7 @@ def sstate_clean_cachefile(ss, d):
200 oe.path.remove(sstatepkgfile) 202 oe.path.remove(sstatepkgfile)
201 203
202def sstate_clean_cachefiles(d): 204def sstate_clean_cachefiles(d):
203 for task in set((bb.data.getVar('SSTATETASKS', d, True) or "").split()): 205 for task in (bb.data.getVar('SSTATETASKS', d, True) or "").split():
204 ss = sstate_state_fromvars(d, task[3:]) 206 ss = sstate_state_fromvars(d, task[3:])
205 sstate_clean_cachefile(ss, d) 207 sstate_clean_cachefile(ss, d)
206 208