summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-16 10:33:18 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-19 17:24:47 +0000
commitce8a2068d41272cd3c3c8be5ec8a4bac77cbb649 (patch)
tree63831e1d80e8148864a496440ae683cd410c4e84 /meta/classes/image.bbclass
parentfb1654fee44fec04b0f833d375bfdd0f0ed12414 (diff)
downloadpoky-ce8a2068d41272cd3c3c8be5ec8a4bac77cbb649.tar.gz
image: Fix instability of do_image_* checksums
The do_image_* tasks contained the expanded version of DATETIME. Due to the expansion, we couldn't exclude the value from the task checksum which meant the task would rerun. We fix this by deleting the DATETIME value during expansion so we don't expand any references to at that time. This means the task's hash can be stable rather than having hardcoded date/time values. It will get expanded at execution time. This also fixes errors shown by -S: NOTE: Reparsing files to collect dependency data Writing locked sigs to /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/locked-sigs.inc ERROR: Bitbake's cached basehash does not match the one we just generated (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/recipes-sato/images/core-image-sato.bb.do_image_tar)! ERROR: The mismatched hashes were 77872792556367f1dde49a1425caf1a0 and 9bb0aca6286ab7dd22d3c69964beb665 (From OE-Core rev: ecbc1db7ed1f9848dee69507de8eb289b8ddeba0) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/image.bbclass')
-rw-r--r--meta/classes/image.bbclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 13b77c9638..a2e966e7ad 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -366,6 +366,10 @@ python () {
366 localdata.setVar('OVERRIDES', '%s:%s' % (realt, old_overrides)) 366 localdata.setVar('OVERRIDES', '%s:%s' % (realt, old_overrides))
367 bb.data.update_data(localdata) 367 bb.data.update_data(localdata)
368 localdata.setVar('type', realt) 368 localdata.setVar('type', realt)
369 # Delete DATETIME so we don't expand any references to it now
370 # This means the task's hash can be stable rather than having hardcoded
371 # date/time values. It will get expanded at execution time.
372 localdata.delVar('DATETIME')
369 373
370 image_cmd = localdata.getVar("IMAGE_CMD", True) 374 image_cmd = localdata.getVar("IMAGE_CMD", True)
371 vardeps.add('IMAGE_CMD_' + realt) 375 vardeps.add('IMAGE_CMD_' + realt)
@@ -394,6 +398,7 @@ python () {
394 d.setVarFlag('do_image_%s' % t, 'postfuncs', 'create_symlinks') 398 d.setVarFlag('do_image_%s' % t, 'postfuncs', 'create_symlinks')
395 d.setVarFlag('do_image_%s' % t, 'subimages', subimages) 399 d.setVarFlag('do_image_%s' % t, 'subimages', subimages)
396 d.appendVarFlag('do_image_%s' % t, 'vardeps', ' '.join(vardeps)) 400 d.appendVarFlag('do_image_%s' % t, 'vardeps', ' '.join(vardeps))
401 d.appendVarFlag('do_image_%s' % t, 'vardepsexclude', 'DATETIME')
397 402
398 after = 'do_image' 403 after = 'do_image'
399 for dep in typedeps[t]: 404 for dep in typedeps[t]: