]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate: use only unique set of SSTATETASK
authorMartin Jansa <martin.jansa@gmail.com>
Wed, 23 Mar 2011 23:05:40 +0000 (00:05 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 24 Mar 2011 00:28:23 +0000 (00:28 +0000)
* otherwise strange error like this:
  ERROR: Logfile of failure stored in: /OE/shr-core/tmp/work/armv7a-oe-linux-gnueabi/libtool-cross-2.4-r1/temp/log.do_package_write_ipk.25551
  Log data follows:
  | ERROR: Package already staged (/OE/shr-core/tmp/sstate-control/manifest-nokia900-libtool-cross.deploy-ipk)?!
  | ERROR: Function 'sstate_task_postfunc' failed
  NOTE: package libtool-cross-2.4-r1: task do_package_write_ipk: Failed
  ERROR: Task 11 (/OE/shr-core/openembedded-core/meta/recipes-devtools/libtool/libtool-cross_2.4.bb, do_package_write_ipk) failed with exit code '1'

  is shown in this case with package_ipk twice in INHERIT

* Thanks to Richard for fix

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sstate.bbclass

index d57c183004a56010a7f3f2af438dcb57075a9a2c..00a709ba44137d362d88a488b85a4be4aa5f7527 100644 (file)
@@ -40,7 +40,7 @@ python () {
         bb.data.setVar('SSTATE_SCAN_CMD', scan_cmd, d)
 
     namemap = []
-    for task in (bb.data.getVar('SSTATETASKS', d, True) or "").split():
+    for task in set((bb.data.getVar('SSTATETASKS', d, True) or "").split()):
         namemap.append(bb.data.getVarFlag(task, 'sstate-name', d))
         funcs = bb.data.getVarFlag(task, 'prefuncs', d) or ""
         funcs = "sstate_task_prefunc " + funcs
@@ -195,7 +195,7 @@ def sstate_clean_cachefile(ss, d):
     oe.path.remove(sstatepkgfile)
 
 def sstate_clean_cachefiles(d):
-    for task in (bb.data.getVar('SSTATETASKS', d, True) or "").split():
+    for task in set((bb.data.getVar('SSTATETASKS', d, True) or "").split()):
         ss = sstate_state_fromvars(d, task[3:])
         sstate_clean_cachefile(ss, d)