diff options
author | Dexuan Cui <dexuan.cui@intel.com> | 2011-04-07 17:38:17 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-04-08 06:06:39 -0700 |
commit | 2f6505f0e795b6c8cad641a6918739c3faac1f99 (patch) | |
tree | 949e8bc26c08be54404f9d0c75caaf09178e2625 /meta | |
parent | 14419f4a4bc629b171281d46750c6abfa84bf83b (diff) | |
download | openembedded-core-2f6505f0e795b6c8cad641a6918739c3faac1f99.tar.gz openembedded-core-2f6505f0e795b6c8cad641a6918739c3faac1f99.tar.bz2 openembedded-core-2f6505f0e795b6c8cad641a6918739c3faac1f99.tar.xz openembedded-core-2f6505f0e795b6c8cad641a6918739c3faac1f99.zip |
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.
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/sstate.bbclass | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index cc0b8665f..be650c4af 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass @@ -39,8 +39,10 @@ python () { scan_cmd = "grep -Irl ${STAGING_DIR} ${SSTATE_BUILDDIR}" bb.data.setVar('SSTATE_SCAN_CMD', scan_cmd, d) + unique_tasks = set((bb.data.getVar('SSTATETASKS', d, True) or "").split()) + d.setVar('SSTATETASKS', " ".join(unique_tasks)) namemap = [] - for task in set((bb.data.getVar('SSTATETASKS', d, True) or "").split()): + for task in unique_tasks: namemap.append(bb.data.getVarFlag(task, 'sstate-name', d)) funcs = bb.data.getVarFlag(task, 'prefuncs', d) or "" funcs = "sstate_task_prefunc " + funcs @@ -200,7 +202,7 @@ def sstate_clean_cachefile(ss, d): oe.path.remove(sstatepkgfile) def sstate_clean_cachefiles(d): - for task in set((bb.data.getVar('SSTATETASKS', d, True) or "").split()): + for task in (bb.data.getVar('SSTATETASKS', d, True) or "").split(): ss = sstate_state_fromvars(d, task[3:]) sstate_clean_cachefile(ss, d) |