diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/buildhistory.bbclass | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 49af61c9c5..b2cf9aa28a 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass | |||
@@ -960,23 +960,19 @@ def write_latest_srcrev(d, pkghistdir): | |||
960 | value = value.replace('"', '').strip() | 960 | value = value.replace('"', '').strip() |
961 | old_tag_srcrevs[key] = value | 961 | old_tag_srcrevs[key] = value |
962 | with open(srcrevfile, 'w') as f: | 962 | with open(srcrevfile, 'w') as f: |
963 | orig_srcrev = d.getVar('SRCREV', False) or 'INVALID' | 963 | for name, srcrev in sorted(srcrevs.items()): |
964 | if orig_srcrev != 'INVALID': | 964 | suffix = "_" + name |
965 | f.write('# SRCREV = "%s"\n' % orig_srcrev) | 965 | if name == "default": |
966 | if len(srcrevs) > 1: | 966 | suffix = "" |
967 | for name, srcrev in sorted(srcrevs.items()): | 967 | orig_srcrev = d.getVar('SRCREV%s' % suffix, False) |
968 | orig_srcrev = d.getVar('SRCREV_%s' % name, False) | 968 | if orig_srcrev: |
969 | if orig_srcrev: | 969 | f.write('# SRCREV%s = "%s"\n' % (suffix, orig_srcrev)) |
970 | f.write('# SRCREV_%s = "%s"\n' % (name, orig_srcrev)) | 970 | f.write('SRCREV%s = "%s"\n' % (suffix, srcrev)) |
971 | f.write('SRCREV_%s = "%s"\n' % (name, srcrev)) | 971 | for name, srcrev in sorted(tag_srcrevs.items()): |
972 | else: | 972 | f.write('# tag_%s = "%s"\n' % (name, srcrev)) |
973 | f.write('SRCREV = "%s"\n' % next(iter(srcrevs.values()))) | 973 | if name in old_tag_srcrevs and old_tag_srcrevs[name] != srcrev: |
974 | if len(tag_srcrevs) > 0: | 974 | pkg = d.getVar('PN') |
975 | for name, srcrev in sorted(tag_srcrevs.items()): | 975 | bb.warn("Revision for tag %s in package %s was changed since last build (from %s to %s)" % (name, pkg, old_tag_srcrevs[name], srcrev)) |
976 | f.write('# tag_%s = "%s"\n' % (name, srcrev)) | ||
977 | if name in old_tag_srcrevs and old_tag_srcrevs[name] != srcrev: | ||
978 | pkg = d.getVar('PN') | ||
979 | bb.warn("Revision for tag %s in package %s was changed since last build (from %s to %s)" % (name, pkg, old_tag_srcrevs[name], srcrev)) | ||
980 | 976 | ||
981 | else: | 977 | else: |
982 | if os.path.exists(srcrevfile): | 978 | if os.path.exists(srcrevfile): |