aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorMichael Ho <Michael.Ho@bmw.de>2018-11-29 14:21:36 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-28 16:56:28 +0000
commitf57d83c72b5f53fb10bc8377862668580d331a8c (patch)
tree056972b29aa4fbd3212fe6d88704c1572f1e4033 /meta/classes
parent30b68e820d641c837b6f60c7b6c21ea987804e8e (diff)
downloadopenembedded-core-contrib-f57d83c72b5f53fb10bc8377862668580d331a8c.tar.gz
sstate: add support for caching shared workdir tasks
The sstate bbclass uses workdir as a hardcoded string in path manipulations. This means that the sstate caching mechanism does not work for the work-shared directory which the kernel uses to share its build configuration and source files for out of tree kernel modules. This commit modifies the path manipulation mechanism to use the work-shared directory if detected in the paths when handling the sstate cache packages. (From OE-Core rev: 27642449f95e38598f9c83948ce109c5891e5877) Signed-off-by: Michael Ho <Michael.Ho@bmw.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/sstate.bbclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 9f059a04a0..e61490ae90 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -362,7 +362,10 @@ def sstate_installpkgdir(ss, d):
for plain in ss['plaindirs']:
workdir = d.getVar('WORKDIR')
+ sharedworkdir = os.path.join(d.getVar('TMPDIR', True), "work-shared")
src = sstateinst + "/" + plain.replace(workdir, '')
+ if sharedworkdir in plain:
+ src = sstateinst + "/" + plain.replace(sharedworkdir, '')
dest = plain
bb.utils.mkdirhier(src)
prepdir(dest)
@@ -620,8 +623,11 @@ def sstate_package(ss, d):
os.rename(state[1], sstatebuild + state[0])
workdir = d.getVar('WORKDIR')
+ sharedworkdir = os.path.join(d.getVar('TMPDIR', True), "work-shared")
for plain in ss['plaindirs']:
pdir = plain.replace(workdir, sstatebuild)
+ if sharedworkdir in plain:
+ pdir = plain.replace(sharedworkdir, sstatebuild)
bb.utils.mkdirhier(plain)
bb.utils.mkdirhier(pdir)
os.rename(plain, pdir)