path: root/meta/lib/oe
diff options
authorRandy Witt <>2016-04-07 16:34:49 -0700
committerRichard Purdie <>2016-04-08 07:53:09 +0100
commit0fe2a5e5ffd01e926d0f3d4c78ad9910296e2d1a (patch)
tree9793ce414ea29d5583379afea33ebe42b1d2b6e6 /meta/lib/oe
parentd28935d84ea4530fc1b7cedfdbc80f311c72f7dd (diff)
openembedded-core-0fe2a5e5ffd01e926d0f3d4c78ad9910296e2d1a.tar.bz2 Split single locked sigs check into multiple checks
Add the SIGGEN_LOCKEDSIGS_TASKSIG_CHECK and SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK variables to replace SIGGEN_LOCKEDSIGS_CHECK_LEVEL. SIGGEN_LOCKEDSIGS_TASKSIG_CHECK will no control whether there is a warning or error if a task's hash in the locked signature file doesn't match the computed hash from the current metadata. SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK will control whther there is a warning or error if a task that supports sstate is in the locked signature file, but no sstate exists for the task. Previously you could only have warning/errors for both controlled by SIGGEN_LOCKEDSIGS_CHECK_LEVEL. This was an issue in the extensible sdk, because we know sstate won't exist for certain items in the reverse dependencies list for tasks. However, we still want to error if task signatures don't match. [YOCTO #9195] Signed-off-by: Randy Witt <> Signed-off-by: Richard Purdie <>
Diffstat (limited to 'meta/lib/oe')
1 files changed, 21 insertions, 6 deletions
diff --git a/meta/lib/oe/ b/meta/lib/oe/
index 5828a9def8..b2319ff213 100644
--- a/meta/lib/oe/
+++ b/meta/lib/oe/
@@ -189,20 +189,35 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(types.keys())))
def checkhashes(self, missed, ret, sq_fn, sq_task, sq_hash, sq_hashfn, d):
- checklevel = d.getVar("SIGGEN_LOCKEDSIGS_CHECK_LEVEL", True)
+ warn_msgs = []
+ error_msgs = []
+ sstate_missing_msgs = []
for task in range(len(sq_fn)):
if task not in ret:
for pn in self.lockedsigs:
if sq_hash[task] in self.lockedsigs[pn].itervalues():
if sq_task[task] == 'do_shared_workdir':
- self.mismatch_msgs.append("Locked sig is set for %s:%s (%s) yet not in sstate cache?"
+ sstate_missing_msgs.append("Locked sig is set for %s:%s (%s) yet not in sstate cache?"
% (pn, sq_task[task], sq_hash[task]))
- if self.mismatch_msgs and checklevel == 'warn':
- bb.warn("\n".join(self.mismatch_msgs))
- elif self.mismatch_msgs and checklevel == 'error':
- bb.fatal("\n".join(self.mismatch_msgs))
+ checklevel = d.getVar("SIGGEN_LOCKEDSIGS_TASKSIG_CHECK", True)
+ if checklevel == 'warn':
+ warn_msgs += self.mismatch_msgs
+ elif checklevel == 'error':
+ error_msgs += self.mismatch_msgs
+ checklevel = d.getVar("SIGGEN_LOCKEDSIGS_SSTATE_EXISTS_CHECK", True)
+ if checklevel == 'warn':
+ warn_msgs += sstate_missing_msgs
+ elif checklevel == 'error':
+ error_msgs += sstate_missing_msgs
+ if warn_msgs:
+ bb.warn("\n".join(warn_msgs))
+ if error_msgs:
+ bb.fatal("\n".join(error_msgs))
# Insert these classes into siggen's namespace so it can see and select them