mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
9dfbb877c7
commit
2b9c40e56b
@@ -896,7 +896,7 @@ def write_latest_srcrev(d, pkghistdir):
|
|||||||
if orig_srcrev != 'INVALID':
|
if orig_srcrev != 'INVALID':
|
||||||
f.write('# SRCREV = "%s"\n' % orig_srcrev)
|
f.write('# SRCREV = "%s"\n' % orig_srcrev)
|
||||||
if len(srcrevs) > 1:
|
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)
|
orig_srcrev = d.getVar('SRCREV_%s' % name, False)
|
||||||
if orig_srcrev:
|
if orig_srcrev:
|
||||||
f.write('# SRCREV_%s = "%s"\n' % (name, orig_srcrev))
|
f.write('# SRCREV_%s = "%s"\n' % (name, orig_srcrev))
|
||||||
@@ -904,7 +904,7 @@ def write_latest_srcrev(d, pkghistdir):
|
|||||||
else:
|
else:
|
||||||
f.write('SRCREV = "%s"\n' % next(iter(srcrevs.values())))
|
f.write('SRCREV = "%s"\n' % next(iter(srcrevs.values())))
|
||||||
if len(tag_srcrevs) > 0:
|
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))
|
f.write('# tag_%s = "%s"\n' % (name, srcrev))
|
||||||
if name in old_tag_srcrevs and old_tag_srcrevs[name] != srcrev:
|
if name in old_tag_srcrevs and old_tag_srcrevs[name] != srcrev:
|
||||||
pkg = d.getVar('PN')
|
pkg = d.getVar('PN')
|
||||||
|
|||||||
Reference in New Issue
Block a user