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>
This commit is contained in:
Richard Purdie 2012-10-19 12:37:39 +00:00
parent a68c7c792e
commit 50247c8f6e
1 changed files with 8 additions and 7 deletions

View File

@ -17,10 +17,7 @@ SSTATE_EXTRAPATH = ""
SSTATE_EXTRAPATHWILDCARD = ""
SSTATE_PATHSPEC = "${SSTATE_DIR}/${SSTATE_EXTRAPATHWILDCARD}*/${SSTATE_PKGSPEC}"
# In theory we should be using:
# 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}"
# However until do_package is not machine specific, we'll have to make do with all of deploy/pkgdata.
SSTATE_DUPWHITELIST = "${DEPLOY_DIR}/ ${TMPDIR}/pkgdata/"
SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/"
# Also need to make cross recipes append to ${PN} and install once for any given PACAGE_ARCH so
# can avoid multiple installs (e.g. routerstationpro+qemumips both using mips32)
SSTATE_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 () {
d.setVar('SSTATE_PKGARCH', d.expand("${SDK_ARCH}_${PACKAGE_ARCH}"))
elif bb.data.inherits_class('allarch', d):
d.setVar('SSTATE_PKGARCH', "allarch")
d.setVar('SSTATE_MANMACH', d.expand("allarch_${MACHINE}"))
else:
d.setVar('SSTATE_MANMACH', d.expand("${MACHINE}"))
d.setVar('SSTATE_MANMACH', d.expand("${PACKAGE_ARCH}"))
if bb.data.inherits_class('native', d) or bb.data.inherits_class('crosssdk', d) or bb.data.inherits_class('cross', d):
d.setVar('SSTATE_EXTRAPATH', "${NATIVELSBSTRING}/")
@ -125,6 +121,9 @@ def sstate_install(ss, d):
shareddirs = []
bb.mkdirhier(d.expand("${SSTATE_MANIFESTS}"))
manifest = d.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'])
extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True)
if extrainf:
manifest = manifest + "." + extrainf
if os.access(manifest, os.R_OK):
bb.fatal("Package already staged (%s)?!" % manifest)
@ -307,6 +306,9 @@ def sstate_clean(ss, d):
import oe.path
manifest = d.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'])
extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True)
if extrainf:
manifest = manifest + "." + extrainf
if os.path.exists(manifest):
locks = []
@ -321,7 +323,6 @@ def sstate_clean(ss, d):
bb.utils.unlockfile(lock)
stfile = d.getVar("STAMP", True) + ".do_" + ss['task']
extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True)
oe.path.remove(stfile)
oe.path.remove(stfile + "_setscene")
if extrainf: