]> code.ossystems Code Review - openembedded-core.git/commitdiff
sstate: Convert to use ':' as a filename sperator and use SSTATE_SWSPEC globally
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 20 Dec 2013 12:06:02 +0000 (12:06 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 20 Dec 2013 12:25:24 +0000 (12:25 +0000)
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/sstate.bbclass
meta/recipes-devtools/gcc/gcc-common.inc

index 199a5b3fc4e11049bb14b1f4d58b4d7f764c7f5d..324d1c1b4998d6bbb010d6915849ec293ab18a1d 100644 (file)
@@ -9,8 +9,8 @@ def generate_sstatefn(spec, hash, d):
     return hash[:2] + "/" + spec + hash
 
 SSTATE_PKGARCH    = "${PACKAGE_ARCH}"
-SSTATE_PKGSPEC    = "sstate-${PN}-${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}-${PV}-${PR}-${SSTATE_PKGARCH}-${SSTATE_VERSION}-"
-SSTATE_SWSPEC     = ""
+SSTATE_PKGSPEC    = "sstate:${PN}:${PACKAGE_ARCH}${TARGET_VENDOR}-${TARGET_OS}:${PV}:${PR}:${SSTATE_PKGARCH}:${SSTATE_VERSION}:"
+SSTATE_SWSPEC     = "sstate:${BPN}::${PV}:${PR}::${SSTATE_VERSION}:"
 SSTATE_PKGNAME    = "${SSTATE_EXTRAPATH}${@generate_sstatefn(d.getVar('SSTATE_PKGSPEC', True), d.getVar('BB_TASKHASH', True), d)}"
 SSTATE_PKG        = "${SSTATE_DIR}/${SSTATE_PKGNAME}"
 SSTATE_EXTRAPATH   = ""
index e49d72477aa74cbe6aa4645ce7fe3e02844fcebd..112e8ce7c74242722a202382d3f7b931254bb428 100644 (file)
@@ -95,7 +95,7 @@ do_patch[stamp-base-clean] = "${SSCLEAN}"
 
 # SW means Shared Work directory
 SW = "${TMPDIR}/work-shared/gcc-${PV}-${PR}"
-SSTATE_SWSPEC = "sstate-gcc-${PV}-${PR}-${SSTATE_VERSION}-"
+SSTATE_SWSPEC = "sstate:gcc::${PV}:${PR}::${SSTATE_VERSION}:"
 WORKDIR_task-unpack = "${SW}"
 WORKDIR_task-patch = "${SW}"