From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: [PATCH] sstate: Improve handling of machine specific manifests
Date: Fri, 19 Oct 2012 15:48:55 +0100 [thread overview]
Message-ID: <1350658135.2520.29.camel@ted> (raw)
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index d2a120b..dee84bf 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -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:
next reply other threads:[~2012-10-19 15:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-19 14:48 Richard Purdie [this message]
2012-10-22 10:44 ` [PATCH] sstate: Improve handling of machine specific manifests Martin Jansa
2012-10-22 10:58 ` Richard Purdie
2012-10-22 11:08 ` Martin Jansa
2012-10-22 11:42 ` Richard Purdie
2012-10-22 12:02 ` Martin Jansa
2012-10-22 13:17 ` Martin Jansa
2012-10-22 13:56 ` Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1350658135.2520.29.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox