summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-19 12:37:39 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-10-22 09:47:48 +0100
commit50247c8f6e0e864266c468afe8537f7fd0a87890 (patch)
treefd5973783bc1208eca50d2680582b5c864adebf5
parenta68c7c792ed85cfb85bcfac32dd629384f169245 (diff)
downloadpoky-50247c8f6e0e864266c468afe8537f7fd0a87890.tar.gz
sstate: Improve handling of machine specific manifests
Now do_package isn't machine specific, we're only left with do_populate_sysroot as a machine specific task. This change marks only the machine specific manifests as machine specific, defaulting to PACKAGE_ARCH for everything else. This means we do less work where there are multiple machines using the same core package architecture and we can start to clean up the sstate duplicate files whitelist. (From OE-Core rev: febeaf3d1b8917b660c7279b008d8b03337568e9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/sstate.bbclass15
1 files changed, 8 insertions, 7 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index d2a120b11b..dee84bf391 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -17,10 +17,7 @@ SSTATE_EXTRAPATH = ""
17SSTATE_EXTRAPATHWILDCARD = "" 17SSTATE_EXTRAPATHWILDCARD = ""
18SSTATE_PATHSPEC = "${SSTATE_DIR}/${SSTATE_EXTRAPATHWILDCARD}*/${SSTATE_PKGSPEC}" 18SSTATE_PATHSPEC = "${SSTATE_DIR}/${SSTATE_EXTRAPATHWILDCARD}*/${SSTATE_PKGSPEC}"
19 19
20# In theory we should be using: 20SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/"
21# SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR_IPK}/all/ ${DEPLOY_DIR_RPM}/all ${DEPLOY_DIR_DEB}/all/ ${TMPDIR}/pkgdata/all${TARGET_VENDOR}-${TARGET_OS}"
22# However until do_package is not machine specific, we'll have to make do with all of deploy/pkgdata.
23SSTATE_DUPWHITELIST = "${DEPLOY_DIR}/ ${TMPDIR}/pkgdata/"
24# Also need to make cross recipes append to ${PN} and install once for any given PACAGE_ARCH so 21# Also need to make cross recipes append to ${PN} and install once for any given PACAGE_ARCH so
25# can avoid multiple installs (e.g. routerstationpro+qemumips both using mips32) 22# can avoid multiple installs (e.g. routerstationpro+qemumips both using mips32)
26SSTATE_DUPWHITELIST += "${STAGING_LIBDIR_NATIVE}/${MULTIMACH_TARGET_SYS} ${STAGING_DIR_NATIVE}/usr/libexec/${MULTIMACH_TARGET_SYS} ${STAGING_BINDIR_NATIVE}/${MULTIMACH_TARGET_SYS} ${STAGING_DIR_NATIVE}${includedir_native}/gcc-build-internal-${MULTIMACH_TARGET_SYS}" 23SSTATE_DUPWHITELIST += "${STAGING_LIBDIR_NATIVE}/${MULTIMACH_TARGET_SYS} ${STAGING_DIR_NATIVE}/usr/libexec/${MULTIMACH_TARGET_SYS} ${STAGING_BINDIR_NATIVE}/${MULTIMACH_TARGET_SYS} ${STAGING_DIR_NATIVE}${includedir_native}/gcc-build-internal-${MULTIMACH_TARGET_SYS}"
@@ -53,9 +50,8 @@ python () {
53 d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}_${PACKAGE_ARCH}")) 50 d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}_${PACKAGE_ARCH}"))
54 elif bb.data.inherits_class('allarch', d): 51 elif bb.data.inherits_class('allarch', d):
55 d.setVar('SSTATE_PKGARCH', "allarch") 52 d.setVar('SSTATE_PKGARCH', "allarch")
56 d.setVar('SSTATE_MANMACH', d.expand("allarch_${MACHINE}"))
57 else: 53 else:
58 d.setVar('SSTATE_MANMACH', d.expand("${MACHINE}")) 54 d.setVar('SSTATE_MANMACH', d.expand("${PACKAGE_ARCH}"))
59 55
60 if bb.data.inherits_class('native', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross', d): 56 if bb.data.inherits_class('native', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross', d):
61 d.setVar('SSTATE_EXTRAPATH', "${NATIVELSBSTRING}/") 57 d.setVar('SSTATE_EXTRAPATH', "${NATIVELSBSTRING}/")
@@ -125,6 +121,9 @@ def sstate_install(ss, d):
125 shareddirs = [] 121 shareddirs = []
126 bb.mkdirhier(d.expand("${SSTATE_MANIFESTS}")) 122 bb.mkdirhier(d.expand("${SSTATE_MANIFESTS}"))
127 manifest = d.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name']) 123 manifest = d.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'])
124 extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True)
125 if extrainf:
126 manifest = manifest + "." + extrainf
128 127
129 if os.access(manifest, os.R_OK): 128 if os.access(manifest, os.R_OK):
130 bb.fatal("Package already staged (%s)?!" % manifest) 129 bb.fatal("Package already staged (%s)?!" % manifest)
@@ -307,6 +306,9 @@ def sstate_clean(ss, d):
307 import oe.path 306 import oe.path
308 307
309 manifest = d.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name']) 308 manifest = d.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'])
309 extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True)
310 if extrainf:
311 manifest = manifest + "." + extrainf
310 312
311 if os.path.exists(manifest): 313 if os.path.exists(manifest):
312 locks = [] 314 locks = []
@@ -321,7 +323,6 @@ def sstate_clean(ss, d):
321 bb.utils.unlockfile(lock) 323 bb.utils.unlockfile(lock)
322 324
323 stfile = d.getVar("STAMP", True) + ".do_" + ss['task'] 325 stfile = d.getVar("STAMP", True) + ".do_" + ss['task']
324 extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True)
325 oe.path.remove(stfile) 326 oe.path.remove(stfile)
326 oe.path.remove(stfile + "_setscene") 327 oe.path.remove(stfile + "_setscene")
327 if extrainf: 328 if extrainf: