diff options
author | Jianxun Zhang <jianxun.zhang@linux.intel.com> | 2016-12-21 14:31:46 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-09 13:39:11 +0000 |
commit | c782cb40d791e959b328998de2f77ca65546084e (patch) | |
tree | f4447ff1dd1f13f1e2ba05778b8c8e12a42c35a7 /meta/lib/oe/sstatesig.py | |
parent | 32da05fa8ff6bd713fbf691bc549857aa0737553 (diff) | |
download | poky-c782cb40d791e959b328998de2f77ca65546084e.tar.gz |
lib/oe.sstatesig: make locked sig file consistent
Sort keys of dict 'types' prior to dumping, in order to have
identical output every time. This could make it a little easier
to diff these human-readable dumps.
(From OE-Core rev: 8abbaba1931e2cb2b87aa733aa9a3e8eb359b500)
Signed-off-by: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/sstatesig.py')
-rw-r--r-- | meta/lib/oe/sstatesig.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py index bd11e2f888..13fd3bd633 100644 --- a/meta/lib/oe/sstatesig.py +++ b/meta/lib/oe/sstatesig.py | |||
@@ -197,7 +197,8 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash): | |||
197 | types[t].append(k) | 197 | types[t].append(k) |
198 | 198 | ||
199 | with open(sigfile, "w") as f: | 199 | with open(sigfile, "w") as f: |
200 | for t in types: | 200 | l = sorted(types) |
201 | for t in l: | ||
201 | f.write('SIGGEN_LOCKEDSIGS_%s = "\\\n' % t) | 202 | f.write('SIGGEN_LOCKEDSIGS_%s = "\\\n' % t) |
202 | types[t].sort() | 203 | types[t].sort() |
203 | sortedk = sorted(types[t], key=lambda k: self.lockedpnmap[k.rsplit(".",1)[0]]) | 204 | sortedk = sorted(types[t], key=lambda k: self.lockedpnmap[k.rsplit(".",1)[0]]) |
@@ -208,7 +209,7 @@ class SignatureGeneratorOEBasicHash(bb.siggen.SignatureGeneratorBasicHash): | |||
208 | continue | 209 | continue |
209 | f.write(" " + self.lockedpnmap[fn] + ":" + task + ":" + self.taskhash[k] + " \\\n") | 210 | f.write(" " + self.lockedpnmap[fn] + ":" + task + ":" + self.taskhash[k] + " \\\n") |
210 | f.write(' "\n') | 211 | f.write(' "\n') |
211 | f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(list(types.keys())))) | 212 | f.write('SIGGEN_LOCKEDSIGS_TYPES_%s = "%s"' % (self.machine, " ".join(l))) |
212 | 213 | ||
213 | def checkhashes(self, missed, ret, sq_fn, sq_task, sq_hash, sq_hashfn, d): | 214 | def checkhashes(self, missed, ret, sq_fn, sq_task, sq_hash, sq_hashfn, d): |
214 | warn_msgs = [] | 215 | warn_msgs = [] |