[oe-commits] Richard Purdie : sstate.bbclass: Improve stamp-extra-info task handling to avoid warnings

git at git.openembedded.org git at git.openembedded.org
Mon Dec 17 17:24:20 UTC 2012


Module: openembedded-core.git
Branch: master
Commit: 2cc8ee57f8148844bb7bcd4aaf34f6891cf3d410
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=2cc8ee57f8148844bb7bcd4aaf34f6891cf3d410

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Fri Dec 14 15:39:56 2012 +0000

sstate.bbclass: Improve stamp-extra-info task handling to avoid warnings

If you change a machine to a different package architecture, you will see sstate
errors about overwriting files as the code stands today. Instead it should clean
out the files safely and correctly. This patch changes the naming of stamp-extra-info
manifest files to avoid this problem. It will potentially trigger warnings during
builds in existing TMPDIRs until the system adjusts to the new naming, these are
harmless.

[YOCTO #3521]

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/sstate.bbclass |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index d3daf1c..d544da9 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -124,10 +124,12 @@ def sstate_install(ss, d):
     sharedfiles = []
     shareddirs = []
     bb.mkdirhier(d.expand("${SSTATE_MANIFESTS}"))
-    manifest = d.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'])
+
+    d2 = d.createCopy()
     extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True)
     if extrainf:
-        manifest = manifest + "." + extrainf
+        d2.setVar("SSTATE_MANMACH", extrainf)
+    manifest = d2.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'])
 
     if os.access(manifest, os.R_OK):
         bb.fatal("Package already staged (%s)?!" % manifest)
@@ -315,10 +317,11 @@ def sstate_clean_manifest(manifest, d):
 def sstate_clean(ss, d):
     import oe.path
 
-    manifest = d.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'])
+    d2 = d.createCopy()
     extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True)
     if extrainf:
-        manifest = manifest + "." + extrainf
+        d2.setVar("SSTATE_MANMACH", extrainf)
+    manifest = d2.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'])
 
     if os.path.exists(manifest):
         locks = []





More information about the Openembedded-commits mailing list