diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-12-20 12:06:02 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-12-20 12:26:31 +0000 |
commit | e5ee1b8c0d141e56ee67778c7b8af92de185dc01 (patch) | |
tree | 05f24fe9ae197ea30da140a6a3d1146e7e512c7b | |
parent | 8685b5cb5156b093e6379407184276e339a28ab7 (diff) | |
download | poky-e5ee1b8c0d141e56ee67778c7b8af92de185dc01.tar.gz |
sstate: Convert to use ':' as a filename sperator and use SSTATE_SWSPEC globally
Currently the code has problems differentiating between "gcc-cross" and "gcc-cross-initial"
sstate files. We could add in a ton of special casing but tests show this isn't scaling
well. Using a more unique separator resolves the issue.
The choice of which separator to use is a hard one. We need something which isn't commonly
used in PN, PV, PR, *_OS and *_ARCH which rules out '-', '_' and it needs to work ok with
webservers/http which makes ';' and '%' harder.
The change also sets SSTATE_SWSPEC globally since writing out differently named siginfo
files for the fetch/unpack/patch tasks is a waste of diskspace, the hashes match for
all PN in the majority of cases and if they don't, its not a big issue as the hash is
different. This makes the results from sstate debugging more understandable.
(From OE-Core rev: 6f823a23c5f1d0ffa0a27db1c1bc1907de788505)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/sstate.bbclass | 4 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-common.inc | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass index 199a5b3fc4..324d1c1b49 100644 --- a/meta/classes/sstate.bbclass +++ b/meta/classes/sstate.bbclass | |||
@@ -9,8 +9,8 @@ def generate_sstatefn(spec, hash, d): | |||
9 | return hash[:2] + "/" + spec + hash | 9 | return hash[:2] + "/" + spec + hash |
10 | 10 | ||
11 | SSTATE_PKGARCH = "${PACKAGE_ARCH}" | 11 | SSTATE_PKGARCH = "${PACKAGE_ARCH}" |
12 | SSTATE_PKGSPEC = "sstate-${PN}-${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}-${PV}-${PR}-${SSTATE_PKGARCH}-${SSTATE_VERSION}-" | 12 | SSTATE_PKGSPEC = "sstate:${PN}:${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}:${PV}:${PR}:${SSTATE_PKGARCH}:${SSTATE_VERSION}:" |
13 | SSTATE_SWSPEC = "" | 13 | SSTATE_SWSPEC = "sstate:${BPN}::${PV}:${PR}::${SSTATE_VERSION}:" |
14 | SSTATE_PKGNAME = "${SSTATE_EXTRAPATH}${@generate_sstatefn(d.getVar('SSTATE_PKGSPEC', True), d.getVar('BB_TASKHASH', True), d)}" | 14 | SSTATE_PKGNAME = "${SSTATE_EXTRAPATH}${@generate_sstatefn(d.getVar('SSTATE_PKGSPEC', True), d.getVar('BB_TASKHASH', True), d)}" |
15 | SSTATE_PKG = "${SSTATE_DIR}/${SSTATE_PKGNAME}" | 15 | SSTATE_PKG = "${SSTATE_DIR}/${SSTATE_PKGNAME}" |
16 | SSTATE_EXTRAPATH = "" | 16 | SSTATE_EXTRAPATH = "" |
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc index e49d72477a..112e8ce7c7 100644 --- a/meta/recipes-devtools/gcc/gcc-common.inc +++ b/meta/recipes-devtools/gcc/gcc-common.inc | |||
@@ -95,7 +95,7 @@ do_patch[stamp-base-clean] = "${SSCLEAN}" | |||
95 | 95 | ||
96 | # SW means Shared Work directory | 96 | # SW means Shared Work directory |
97 | SW = "${TMPDIR}/work-shared/gcc-${PV}-${PR}" | 97 | SW = "${TMPDIR}/work-shared/gcc-${PV}-${PR}" |
98 | SSTATE_SWSPEC = "sstate-gcc-${PV}-${PR}-${SSTATE_VERSION}-" | 98 | SSTATE_SWSPEC = "sstate:gcc::${PV}:${PR}::${SSTATE_VERSION}:" |
99 | WORKDIR_task-unpack = "${SW}" | 99 | WORKDIR_task-unpack = "${SW}" |
100 | WORKDIR_task-patch = "${SW}" | 100 | WORKDIR_task-patch = "${SW}" |
101 | 101 | ||