Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] sstate: Improve handling of machine specific manifests
@ 2012-10-19 14:48 Richard Purdie
  2012-10-22 10:44 ` Martin Jansa
  0 siblings, 1 reply; 8+ messages in thread
From: Richard Purdie @ 2012-10-19 14:48 UTC (permalink / raw)
  To: openembedded-core

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:





^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-10-22 14:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-19 14:48 [PATCH] sstate: Improve handling of machine specific manifests Richard Purdie
2012-10-22 10:44 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox