summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRandy Witt <randy.e.witt@linux.intel.com>2016-04-07 16:34:50 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-09 23:00:43 +0100
commit2431ed7ec6a43334f056136b49db57c02ed9bd9a (patch)
tree00471c35ab2a0cbc0776ce89be35e0197fdbbf53 /meta/lib
parent7e902807cb6c6d453972a3af4d632e627aa5e1fb (diff)
downloadpoky-2431ed7ec6a43334f056136b49db57c02ed9bd9a.tar.gz
sstatesig.py: Improve the SIGGEN_LOCKEDSIGS_TASKSIG_CHECK message
The previous message when signatures didn't match between the metadata and the locked signatures file, the message output was a bit confusing. Now the message should be of the form: The zlib-native:do_install sig is computed to be 53531910a2a7848432da89def942a91a, but the sig is locked to d25ba9035f7ccb308e51bbe1066e8d27 in SIGGEN_LOCKEDSIGS_t-x86-64 which will hopefully be more useful in understanding the problem. [YOCTO #9195] (From OE-Core rev: 49eeabfff8bbea69401db41f7219e29acf47af73) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oe/sstatesig.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index b2319ff213..009adeadbf 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -65,12 +65,13 @@ def sstate_lockedsigs(d):
65 sigs = {} 65 sigs = {}
66 types = (d.getVar("SIGGEN_LOCKEDSIGS_TYPES", True) or "").split() 66 types = (d.getVar("SIGGEN_LOCKEDSIGS_TYPES", True) or "").split()
67 for t in types: 67 for t in types:
68 lockedsigs = (d.getVar("SIGGEN_LOCKEDSIGS_%s" % t, True) or "").split() 68 siggen_lockedsigs_var = "SIGGEN_LOCKEDSIGS_%s" % t
69 lockedsigs = (d.getVar(siggen_lockedsigs_var, True) or "").split()
69 for ls in lockedsigs: 70 for ls in lockedsigs:
70 pn, task, h = ls.split(":", 2) 71 pn, task, h = ls.split(":", 2)
71 if pn not in sigs: 72 if pn not in sigs:
72 sigs[pn] = {} 73 sigs[pn] = {}
73 sigs[pn][task] = h 74 sigs[pn][task] = [h, siggen_lockedsigs_var]
74 return sigs 75 return sigs
75 76
76class SignatureGeneratorOEBasic(bb.siggen.SignatureGeneratorBasic): 77class SignatureGeneratorOEBasic(bb.siggen.SignatureGeneratorBasic):
@@ -138,14 +139,15 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash):
138 if recipename in self.lockedsigs: 139 if recipename in self.lockedsigs:
139 if task in self.lockedsigs[recipename]: 140 if task in self.lockedsigs[recipename]:
140 k = fn + "." + task 141 k = fn + "." + task
141 h_locked = self.lockedsigs[recipename][task] 142 h_locked = self.lockedsigs[recipename][task][0]
143 var = self.lockedsigs[recipename][task][1]
142 self.lockedhashes[k] = h_locked 144 self.lockedhashes[k] = h_locked
143 self.taskhash[k] = h_locked 145 self.taskhash[k] = h_locked
144 #bb.warn("Using %s %s %s" % (recipename, task, h)) 146 #bb.warn("Using %s %s %s" % (recipename, task, h))
145 147
146 if h != h_locked: 148 if h != h_locked:
147 self.mismatch_msgs.append('The %s:%s sig (%s) changed, use locked sig %s to instead' 149 self.mismatch_msgs.append('The %s:%s sig is computed to be %s, but the sig is locked to %s in %s'
148 % (recipename, task, h, h_locked)) 150 % (recipename, task, h, h_locked, var))
149 151
150 return h_locked 152 return h_locked
151 #bb.warn("%s %s %s" % (recipename, task, h)) 153 #bb.warn("%s %s %s" % (recipename, task, h))