diff options
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/lib/oe/sstatesig.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py index 633a0fd450..5bf1697e72 100644 --- a/meta/lib/oe/sstatesig.py +++ b/meta/lib/oe/sstatesig.py | |||
| @@ -104,6 +104,8 @@ class SignatureGeneratorOEBasicHashMixIn(object): | |||
| 104 | self.lockedhashfn = {} | 104 | self.lockedhashfn = {} |
| 105 | self.machine = data.getVar("MACHINE") | 105 | self.machine = data.getVar("MACHINE") |
| 106 | self.mismatch_msgs = [] | 106 | self.mismatch_msgs = [] |
| 107 | self.mismatch_number = 0 | ||
| 108 | self.lockedsigs_msgs = "" | ||
| 107 | self.unlockedrecipes = (data.getVar("SIGGEN_UNLOCKED_RECIPES") or | 109 | self.unlockedrecipes = (data.getVar("SIGGEN_UNLOCKED_RECIPES") or |
| 108 | "").split() | 110 | "").split() |
| 109 | self.unlockedrecipes = { k: "" for k in self.unlockedrecipes } | 111 | self.unlockedrecipes = { k: "" for k in self.unlockedrecipes } |
| @@ -187,6 +189,7 @@ class SignatureGeneratorOEBasicHashMixIn(object): | |||
| 187 | #bb.warn("Using %s %s %s" % (recipename, task, h)) | 189 | #bb.warn("Using %s %s %s" % (recipename, task, h)) |
| 188 | 190 | ||
| 189 | if h != h_locked and h_locked != unihash: | 191 | if h != h_locked and h_locked != unihash: |
| 192 | self.mismatch_number += 1 | ||
| 190 | self.mismatch_msgs.append('The %s:%s sig is computed to be %s, but the sig is locked to %s in %s' | 193 | self.mismatch_msgs.append('The %s:%s sig is computed to be %s, but the sig is locked to %s in %s' |
| 191 | % (recipename, task, h, h_locked, var)) | 194 | % (recipename, task, h, h_locked, var)) |
| 192 | 195 | ||
| @@ -267,6 +270,15 @@ class SignatureGeneratorOEBasicHashMixIn(object): | |||
| 267 | warn_msgs = [] | 270 | warn_msgs = [] |
| 268 | error_msgs = [] | 271 | error_msgs = [] |
| 269 | sstate_missing_msgs = [] | 272 | sstate_missing_msgs = [] |
| 273 | info_msgs = None | ||
| 274 | |||
| 275 | if self.lockedsigs: | ||
| 276 | if len(self.lockedsigs) > 10: | ||
| 277 | self.lockedsigs_msgs = "There are %s recipes with locked tasks (%s task(s) have non matching signature)" % (len(self.lockedsigs), self.mismatch_number) | ||
| 278 | else: | ||
| 279 | self.lockedsigs_msgs = "The following recipes have locked tasks:" | ||
| 280 | for pn in self.lockedsigs: | ||
| 281 | self.lockedsigs_msgs += " %s" % (pn) | ||
| 270 | 282 | ||
| 271 | for tid in sq_data['hash']: | 283 | for tid in sq_data['hash']: |
| 272 | if tid not in found: | 284 | if tid not in found: |
| @@ -279,7 +291,9 @@ class SignatureGeneratorOEBasicHashMixIn(object): | |||
| 279 | % (pn, taskname, sq_data['hash'][tid])) | 291 | % (pn, taskname, sq_data['hash'][tid])) |
| 280 | 292 | ||
| 281 | checklevel = d.getVar("SIGGEN_LOCKEDSIGS_TASKSIG_CHECK") | 293 | checklevel = d.getVar("SIGGEN_LOCKEDSIGS_TASKSIG_CHECK") |
| 282 | if checklevel == 'warn': | 294 | if checklevel == 'info': |
| 295 | info_msgs = self.lockedsigs_msgs | ||
| 296 | if checklevel == 'warn' or checklevel == 'info': | ||
| 283 | warn_msgs += self.mismatch_msgs | 297 | warn_msgs += self.mismatch_msgs |
| 284 | elif checklevel == 'error': | 298 | elif checklevel == 'error': |
| 285 | error_msgs += self.mismatch_msgs | 299 | error_msgs += self.mismatch_msgs |
| @@ -290,6 +304,8 @@ class SignatureGeneratorOEBasicHashMixIn(object): | |||
| 290 | elif checklevel == 'error': | 304 | elif checklevel == 'error': |
| 291 | error_msgs += sstate_missing_msgs | 305 | error_msgs += sstate_missing_msgs |
| 292 | 306 | ||
| 307 | if info_msgs: | ||
| 308 | bb.note(info_msgs) | ||
| 293 | if warn_msgs: | 309 | if warn_msgs: |
| 294 | bb.warn("\n".join(warn_msgs)) | 310 | bb.warn("\n".join(warn_msgs)) |
| 295 | if error_msgs: | 311 | if error_msgs: |
