]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate.bbclass: specify func dirs for sstate_hardcode_path
authorWenzong Fan <wenzong.fan@windriver.com>
Wed, 15 Oct 2014 03:10:48 +0000 (23:10 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 18 Oct 2014 14:12:55 +0000 (16:12 +0200)
For some recipes that inhrient cmake, the ${B} may be removed by
cmake_do_configure() while sstate_hardcode_path() running, this
causes build errors:

  Exception: OSError: [Errno 2] No such file or directory: \
  '/path/to/build'

The function sstate_hardcode_path() called command:

  $SSTATE_SCAN_CMD which extended as "find ${SSTATE_BUILDDIR} ..."

So the proper function dirs could be ${SSTATE_BUILDDIR}.

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/sstate.bbclass

index 9cd4590158beaa5f4c52ab0e8a975a9d866169f7..f8695e7e9bd66ce113cc49ef9e704f93bde9ee8d 100644 (file)
@@ -47,6 +47,11 @@ SIGGEN_LOCKEDSIGS_CHECK_LEVEL ?= 'error'
 sstate_create_package[dirs] = "${SSTATE_BUILDDIR}"
 sstate_unpack_package[dirs] = "${SSTATE_INSTDIR}"
 
+# Do not run sstate_hardcode_path() in ${B}:
+# the ${B} maybe removed by cmake_do_configure() while
+# sstate_hardcode_path() running.
+sstate_hardcode_path[dirs] = "${SSTATE_BUILDDIR}"
+
 python () {
     if bb.data.inherits_class('native', d):
         d.setVar('SSTATE_PKGARCH', d.getVar('BUILD_ARCH'))