summaryrefslogtreecommitdiffstats
path: root/meta/classes/buildhistory.bbclass
diff options
context:
space:
mode:
authorJacob Kroon <jacob.kroon@gmail.com>2018-12-21 10:05:00 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-07 10:54:13 +0000
commit2b9c40e56bd435ec405e020a815d199bca3f82ab (patch)
treea78c366efb0b6790ae9a4388af7cc62f35467d39 /meta/classes/buildhistory.bbclass
parent9dfbb877c7801afa126bb50f6556401a2d4782d1 (diff)
downloadpoky-2b9c40e56bd435ec405e020a815d199bca3f82ab.tar.gz
classes/buildhistory: avoid git diff churn by sorting more dictionaries
Sort 'srcrevs' and 'tag_srcrevs' before iterating over them in order to avoid unnecessary changes in the build history. (From OE-Core rev: 031d708aedda11d65ba9746af4f01b91264a1f86) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r--meta/classes/buildhistory.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 40b292b139..d1f3e6aa82 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -896,7 +896,7 @@ def write_latest_srcrev(d, pkghistdir):
896 if orig_srcrev != 'INVALID': 896 if orig_srcrev != 'INVALID':
897 f.write('# SRCREV = "%s"\n' % orig_srcrev) 897 f.write('# SRCREV = "%s"\n' % orig_srcrev)
898 if len(srcrevs) > 1: 898 if len(srcrevs) > 1:
899 for name, srcrev in srcrevs.items(): 899 for name, srcrev in sorted(srcrevs.items()):
900 orig_srcrev = d.getVar('SRCREV_%s' % name, False) 900 orig_srcrev = d.getVar('SRCREV_%s' % name, False)
901 if orig_srcrev: 901 if orig_srcrev:
902 f.write('# SRCREV_%s = "%s"\n' % (name, orig_srcrev)) 902 f.write('# SRCREV_%s = "%s"\n' % (name, orig_srcrev))
@@ -904,7 +904,7 @@ def write_latest_srcrev(d, pkghistdir):
904 else: 904 else:
905 f.write('SRCREV = "%s"\n' % next(iter(srcrevs.values()))) 905 f.write('SRCREV = "%s"\n' % next(iter(srcrevs.values())))
906 if len(tag_srcrevs) > 0: 906 if len(tag_srcrevs) > 0:
907 for name, srcrev in tag_srcrevs.items(): 907 for name, srcrev in sorted(tag_srcrevs.items()):
908 f.write('# tag_%s = "%s"\n' % (name, srcrev)) 908 f.write('# tag_%s = "%s"\n' % (name, srcrev))
909 if name in old_tag_srcrevs and old_tag_srcrevs[name] != srcrev: 909 if name in old_tag_srcrevs and old_tag_srcrevs[name] != srcrev:
910 pkg = d.getVar('PN') 910 pkg = d.getVar('PN')