aboutsummaryrefslogtreecommitdiffstats
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:01 +0000
commit031d708aedda11d65ba9746af4f01b91264a1f86 (patch)
tree94f163806e409eaf1b1c66e79ecd913e705e9a77
parent6de9eb72f679dd8d8e4de972b1da978522cff8b4 (diff)
downloadopenembedded-core-contrib-031d708aedda11d65ba9746af4f01b91264a1f86.tar.gz
openembedded-core-contrib-031d708aedda11d65ba9746af4f01b91264a1f86.tar.bz2
openembedded-core-contrib-031d708aedda11d65ba9746af4f01b91264a1f86.zip
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. Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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):
if orig_srcrev != 'INVALID':
f.write('# SRCREV = "%s"\n' % orig_srcrev)
if len(srcrevs) > 1:
- for name, srcrev in srcrevs.items():
+ for name, srcrev in sorted(srcrevs.items()):
orig_srcrev = d.getVar('SRCREV_%s' % name, False)
if orig_srcrev:
f.write('# SRCREV_%s = "%s"\n' % (name, orig_srcrev))
@@ -904,7 +904,7 @@ def write_latest_srcrev(d, pkghistdir):
else:
f.write('SRCREV = "%s"\n' % next(iter(srcrevs.values())))
if len(tag_srcrevs) > 0:
- for name, srcrev in tag_srcrevs.items():
+ for name, srcrev in sorted(tag_srcrevs.items()):
f.write('# tag_%s = "%s"\n' % (name, srcrev))
if name in old_tag_srcrevs and old_tag_srcrevs[name] != srcrev:
pkg = d.getVar('PN')