summaryrefslogtreecommitdiff
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2013-05-29 09:21:00 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-04 11:21:30 +0100
commit2e840db56c45b4c63fded55f4ed763b7099284b9 (patch)
treea802403995618a9a58f782a4770bd5b52de959bd /meta/classes/sstate.bbclass
parenta45a247e2cfa58892a0c9eb050d603a38cd839db (diff)
downloadopenembedded-core-2e840db56c45b4c63fded55f4ed763b7099284b9.tar.gz
openembedded-core-2e840db56c45b4c63fded55f4ed763b7099284b9.tar.bz2
openembedded-core-2e840db56c45b4c63fded55f4ed763b7099284b9.zip
sstate.bbclass: fixup extra hardcoded paths
sstate has a logic to fixup hardcoded paths in scripts, but it misses in some specific cases, so add EXTRA_STAGING_FIXMES to the fixup hardcoded paths mechanism, so that we can specify what hardcoded paths need to be fixed in a recipe, e.g. EXTRA_STAGING_FIXMES = "STAGING_BINDIR_TOOLCHAIN" Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 9a76a6b3cc..950be5586d 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -32,6 +32,7 @@ SSTATE_MANMACH ?= "${SSTATE_PKGARCH}"
SSTATEPREINSTFUNCS ?= ""
SSTATEPOSTINSTFUNCS ?= ""
+EXTRA_STAGING_FIXMES ?= ""
# Specify dirs in which the shell function is executed and don't use ${B}
# as default dirs to avoid possible race about ${B} with other task.
@@ -258,6 +259,11 @@ def sstate_installpkg(ss, d):
else:
sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRHOST:%s:g'" % (staging_host)
+ extra_staging_fixmes = d.getVar('EXTRA_STAGING_FIXMES', True) or ''
+ for fixmevar in extra_staging_fixmes.split():
+ fixme_path = d.getVar(fixmevar, True)
+ sstate_sed_cmd += " -e 's:FIXME_%s:%s:g'" % (fixmevar, fixme_path)
+
# Add sstateinst to each filename in fixmepath, use xargs to efficiently call sed
sstate_hardcode_cmd = "sed -e 's:^:%s:g' %s | xargs %s" % (sstateinst, fixmefn, sstate_sed_cmd)
@@ -392,6 +398,11 @@ def sstate_hardcode_path(d):
sstate_grep_cmd = "grep -l -e '%s'" % (staging_host)
sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % (staging_host)
+ extra_staging_fixmes = d.getVar('EXTRA_STAGING_FIXMES', True) or ''
+ for fixmevar in extra_staging_fixmes.split():
+ fixme_path = d.getVar(fixmevar, True)
+ sstate_sed_cmd += " -e 's:%s:FIXME_%s:g'" % (fixme_path, fixmevar)
+
fixmefn = sstate_builddir + "fixmepath"
sstate_scan_cmd = d.getVar('SSTATE_SCAN_CMD', True)