summaryrefslogtreecommitdiffstats
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-14 15:39:56 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-17 17:24:58 +0000
commit1e548a7fc735e55d411e3c529e1fcf8ded626156 (patch)
tree5d23a3ca15fe4686e2afe6cd5b522e533180b24d /meta/classes/sstate.bbclass
parent2636cb113380532f356da07a4039de0b362620fd (diff)
downloadpoky-1e548a7fc735e55d411e3c529e1fcf8ded626156.tar.gz
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] (From OE-Core rev: 2cc8ee57f8148844bb7bcd4aaf34f6891cf3d410) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass11
1 files changed, 7 insertions, 4 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index d3daf1c35d..d544da97d6 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -124,10 +124,12 @@ def sstate_install(ss, d):
124 sharedfiles = [] 124 sharedfiles = []
125 shareddirs = [] 125 shareddirs = []
126 bb.mkdirhier(d.expand("${SSTATE_MANIFESTS}")) 126 bb.mkdirhier(d.expand("${SSTATE_MANIFESTS}"))
127 manifest = d.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name']) 127
128 d2 = d.createCopy()
128 extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True) 129 extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True)
129 if extrainf: 130 if extrainf:
130 manifest = manifest + "." + extrainf 131 d2.setVar("SSTATE_MANMACH", extrainf)
132 manifest = d2.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'])
131 133
132 if os.access(manifest, os.R_OK): 134 if os.access(manifest, os.R_OK):
133 bb.fatal("Package already staged (%s)?!" % manifest) 135 bb.fatal("Package already staged (%s)?!" % manifest)
@@ -315,10 +317,11 @@ def sstate_clean_manifest(manifest, d):
315def sstate_clean(ss, d): 317def sstate_clean(ss, d):
316 import oe.path 318 import oe.path
317 319
318 manifest = d.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name']) 320 d2 = d.createCopy()
319 extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True) 321 extrainf = d.getVarFlag("do_" + ss['task'], 'stamp-extra-info', True)
320 if extrainf: 322 if extrainf:
321 manifest = manifest + "." + extrainf 323 d2.setVar("SSTATE_MANMACH", extrainf)
324 manifest = d2.expand("${SSTATE_MANFILEPREFIX}.%s" % ss['name'])
322 325
323 if os.path.exists(manifest): 326 if os.path.exists(manifest):
324 locks = [] 327 locks = []