summaryrefslogtreecommitdiffstats
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
authorKristian Amlie <kristian.amlie@mender.io>2017-01-25 15:46:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-31 14:43:01 +0000
commit2313a77d8474c742e1cd8cee246f6c05847dd3c6 (patch)
tree772d2c12eb7f2b705e33904d4e7d000aee1536ed /meta/classes/sstate.bbclass
parent5302fb4620b8fc403ec41ca9bc863fe387dcee6c (diff)
downloadpoky-2313a77d8474c742e1cd8cee246f6c05847dd3c6.tar.gz
sstate: Make SSTATE_SCAN_CMD vars configurable using weak defaults.
For this we move them out of the python section so they can be overridden on a per-recipe basis. The motivation for this change is that not all tool chains need the path modifications provided by the command, and these will provide alternative or empty commands. The Go compiler is such an example. (From OE-Core rev: 7d2a2160336413736dd4640f5b84ba4d74bb00f5) Signed-off-by: Kristian Amlie <kristian.amlie@mender.io> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass9
1 files changed, 2 insertions, 7 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 31789da50a..aeb7466d35 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -34,7 +34,8 @@ SSTATE_DUPWHITELIST += "${DEPLOY_DIR_SRC}"
34SSTATE_DUPWHITELIST += "${DEPLOY_DIR}/sdk/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt" 34SSTATE_DUPWHITELIST += "${DEPLOY_DIR}/sdk/README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt"
35 35
36SSTATE_SCAN_FILES ?= "*.la *-config *_config" 36SSTATE_SCAN_FILES ?= "*.la *-config *_config"
37SSTATE_SCAN_CMD ?= 'find ${SSTATE_BUILDDIR} \( -name "${@"\" -o -name \"".join(d.getVar("SSTATE_SCAN_FILES").split())}" \) -type f' 37SSTATE_SCAN_CMD ??= 'find ${SSTATE_BUILDDIR} \( -name "${@"\" -o -name \"".join(d.getVar("SSTATE_SCAN_FILES").split())}" \) -type f'
38SSTATE_SCAN_CMD_NATIVE ??= 'grep -Irl -e ${RECIPE_SYSROOT} -e ${RECIPE_SYSROOT_NATIVE} ${SSTATE_BUILDDIR}'
38 39
39BB_HASHFILENAME = "False ${SSTATE_PKGSPEC} ${SSTATE_SWSPEC}" 40BB_HASHFILENAME = "False ${SSTATE_PKGSPEC} ${SSTATE_SWSPEC}"
40 41
@@ -94,12 +95,6 @@ python () {
94 d.setVar('BB_HASHFILENAME', "True ${SSTATE_PKGSPEC} ${SSTATE_SWSPEC}") 95 d.setVar('BB_HASHFILENAME', "True ${SSTATE_PKGSPEC} ${SSTATE_SWSPEC}")
95 d.setVar('SSTATE_EXTRAPATHWILDCARD', "*/") 96 d.setVar('SSTATE_EXTRAPATHWILDCARD', "*/")
96 97
97 # These classes encode staging paths into their scripts data so can only be
98 # reused if we manipulate the paths
99 if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d) or bb.data.inherits_class('sdk', d) or bb.data.inherits_class('crosssdk', d):
100 scan_cmd = "grep -Irl -e ${RECIPE_SYSROOT} -e ${RECIPE_SYSROOT_NATIVE} ${SSTATE_BUILDDIR}"
101 d.setVar('SSTATE_SCAN_CMD', scan_cmd)
102
103 unique_tasks = sorted(set((d.getVar('SSTATETASKS') or "").split())) 98 unique_tasks = sorted(set((d.getVar('SSTATETASKS') or "").split()))
104 d.setVar('SSTATETASKS', " ".join(unique_tasks)) 99 d.setVar('SSTATETASKS', " ".join(unique_tasks))
105 for task in unique_tasks: 100 for task in unique_tasks: