summaryrefslogtreecommitdiffstats
path: root/meta
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:43:35 +0100
commit50fae526de5f2f55812b34bac6e85dd98a00e141 (patch)
tree01efa9eab2eb82293c15f7a345c39d5e99d12570 /meta
parent9ba5cedf9aaa51e80b7f07345c744af47fda34d3 (diff)
downloadpoky-50fae526de5f2f55812b34bac6e85dd98a00e141.tar.gz
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" (From OE-Core rev: 2e840db56c45b4c63fded55f4ed763b7099284b9) 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')
-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}"
32 32
33SSTATEPREINSTFUNCS ?= "" 33SSTATEPREINSTFUNCS ?= ""
34SSTATEPOSTINSTFUNCS ?= "" 34SSTATEPOSTINSTFUNCS ?= ""
35EXTRA_STAGING_FIXMES ?= ""
35 36
36# Specify dirs in which the shell function is executed and don't use ${B} 37# Specify dirs in which the shell function is executed and don't use ${B}
37# as default dirs to avoid possible race about ${B} with other task. 38# as default dirs to avoid possible race about ${B} with other task.
@@ -258,6 +259,11 @@ def sstate_installpkg(ss, d):
258 else: 259 else:
259 sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRHOST:%s:g'" % (staging_host) 260 sstate_sed_cmd = "sed -i -e 's:FIXMESTAGINGDIRHOST:%s:g'" % (staging_host)
260 261
262 extra_staging_fixmes = d.getVar('EXTRA_STAGING_FIXMES', True) or ''
263 for fixmevar in extra_staging_fixmes.split():
264 fixme_path = d.getVar(fixmevar, True)
265 sstate_sed_cmd += " -e 's:FIXME_%s:%s:g'" % (fixmevar, fixme_path)
266
261 # Add sstateinst to each filename in fixmepath, use xargs to efficiently call sed 267 # Add sstateinst to each filename in fixmepath, use xargs to efficiently call sed
262 sstate_hardcode_cmd = "sed -e 's:^:%s:g' %s | xargs %s" % (sstateinst, fixmefn, sstate_sed_cmd) 268 sstate_hardcode_cmd = "sed -e 's:^:%s:g' %s | xargs %s" % (sstateinst, fixmefn, sstate_sed_cmd)
263 269
@@ -392,6 +398,11 @@ def sstate_hardcode_path(d):
392 sstate_grep_cmd = "grep -l -e '%s'" % (staging_host) 398 sstate_grep_cmd = "grep -l -e '%s'" % (staging_host)
393 sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % (staging_host) 399 sstate_sed_cmd = "sed -i -e 's:%s:FIXMESTAGINGDIRHOST:g'" % (staging_host)
394 400
401 extra_staging_fixmes = d.getVar('EXTRA_STAGING_FIXMES', True) or ''
402 for fixmevar in extra_staging_fixmes.split():
403 fixme_path = d.getVar(fixmevar, True)
404 sstate_sed_cmd += " -e 's:%s:FIXME_%s:g'" % (fixme_path, fixmevar)
405
395 fixmefn = sstate_builddir + "fixmepath" 406 fixmefn = sstate_builddir + "fixmepath"
396 407
397 sstate_scan_cmd = d.getVar('SSTATE_SCAN_CMD', True) 408 sstate_scan_cmd = d.getVar('SSTATE_SCAN_CMD', True)