sstate.bbclass, staging.bbclass: Handle HOSTTOOLS_DIR when restoring state

Paths to host tools that have been copied to ${HOSTTOOLS_DIR} may end
up in the sstate cache. They thus need to be corrected when restoring
from the sstate cache.

(From OE-Core rev: f8671aecf05a286dd2b34b07bb5fbbe0c31e26d0)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Peter Kjellerstedt 2017-04-28 17:01:02 +02:00 committed by Richard Purdie
parent 160c4fd9ae
commit 1d57ca352f
3 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@ SSTATEPOSTCREATEFUNCS = ""
SSTATEPREINSTFUNCS = ""
SSTATEPOSTUNPACKFUNCS = "sstate_hardcode_path_unpack"
SSTATEPOSTINSTFUNCS = ""
EXTRA_STAGING_FIXMES ?= ""
EXTRA_STAGING_FIXMES ?= "HOSTTOOLS_DIR"
SSTATECLEANFUNCS = ""
# Check whether sstate exists for tasks that support sstate and are in the

View File

@ -249,7 +249,7 @@ def staging_processfixme(fixme, target, recipesysroot, recipesysrootnative, d):
if not fixme:
return
cmd = "sed -e 's:^[^/]*/:%s/:g' %s | xargs sed -i -e 's:FIXMESTAGINGDIRTARGET:%s:g; s:FIXMESTAGINGDIRHOST:%s:g'" % (target, " ".join(fixme), recipesysroot, recipesysrootnative)
for fixmevar in ['PKGDATA_DIR']:
for fixmevar in ['HOSTTOOLS_DIR', 'PKGDATA_DIR']:
fixme_path = d.getVar(fixmevar)
cmd += " -e 's:FIXME_%s:%s:g'" % (fixmevar, fixme_path)
bb.note(cmd)

View File

@ -9,7 +9,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
# We need the following for the sstate code to process the wrapper
SSTATE_SCAN_FILES += "depmodwrapper"
EXTRA_STAGING_FIXMES = "PKGDATA_DIR"
EXTRA_STAGING_FIXMES += "PKGDATA_DIR"
do_populate_sysroot[depends] = ""