]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
classes/buildhistory: avoid git diff churn by sorting more dictionaries
authorJacob Kroon <jacob.kroon@gmail.com>
Fri, 21 Dec 2018 09:05:00 +0000 (10:05 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 7 Jan 2019 10:54:01 +0000 (10:54 +0000)
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>
meta/classes/buildhistory.bbclass

index 40b292b139f6bbb405ec962bda90ac7e4a9b4629..d1f3e6aa8257173118edfbde643ae0570ffac803 100644 (file)
@@ -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')