While dumping locked signature, if there is nothing added in the current build (such as build the same recipe again), there are accumulating empty SIGGEN_LOCKEDSIGS added, such as: ... SIGGEN_LOCKEDSIGS_t-x86-64 += "\ " SIGGEN_LOCKEDSIGS_TYPES_qemux86 += "t-x86-64"
SIGGEN_LOCKEDSIGS_t-x86-64 += "\ " SIGGEN_LOCKEDSIGS_TYPES_qemux86 += "t-x86-64" ... Add new item checking to fix the issue. Invoke set() to drop duplicated types Signed-off-by: Hongxu Jia <hongxu....@windriver.com> --- meta/lib/oe/sstatesig.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py index 56fd953..b2ffc7e 100644 --- a/meta/lib/oe/sstatesig.py +++ b/meta/lib/oe/sstatesig.py @@ -64,7 +64,7 @@ def sstate_rundepfilter(siggen, fn, recipename, task, dep, depname, dataCache): def sstate_lockedsigs(d): sigs = {} types = (d.getVar("SIGGEN_LOCKEDSIGS_TYPES", True) or "").split() - for t in types: + for t in set(types): lockedsigs = (d.getVar("SIGGEN_LOCKEDSIGS_%s" % t, True) or "").split() for ls in lockedsigs: pn, task, h = ls.split(":", 2) @@ -143,6 +143,7 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash): bb.plain("Writing locked sigs to %s" % sigfile) types = {} + has_new_lockedsigs = False for k in self.runtaskdeps: fn = k.rsplit(".",1)[0] t = self.lockedhashfn[fn].split(" ")[1].split(":")[5] @@ -151,6 +152,20 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash): types[t] = [] types[t].append(k) + if not has_new_lockedsigs: + pn = self.lockedpnmap[fn] + if pn not in self.lockedsigs: + has_new_lockedsigs = True + continue + task = k.rsplit(".",1)[1] + if task not in self.lockedsigs[pn]: + has_new_lockedsigs = True + continue + + if not has_new_lockedsigs: + bb.plain("Nothing added to %s" % sigfile) + return + with open(sigfile, "a") as f: for t in types: f.write('SIGGEN_LOCKEDSIGS_%s += "\\\n' % t) -- 1.9.1 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core