summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/buildhistory.bbclass30
1 files changed, 13 insertions, 17 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 44a66df962..2746996cbb 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -953,23 +953,19 @@ def write_latest_srcrev(d, pkghistdir):
953 value = value.replace('"', '').strip() 953 value = value.replace('"', '').strip()
954 old_tag_srcrevs[key] = value 954 old_tag_srcrevs[key] = value
955 with open(srcrevfile, 'w') as f: 955 with open(srcrevfile, 'w') as f:
956 orig_srcrev = d.getVar('SRCREV', False) or 'INVALID' 956 for name, srcrev in sorted(srcrevs.items()):
957 if orig_srcrev != 'INVALID': 957 suffix = "_" + name
958 f.write('# SRCREV = "%s"\n' % orig_srcrev) 958 if name == "default":
959 if len(srcrevs) > 1: 959 suffix = ""
960 for name, srcrev in sorted(srcrevs.items()): 960 orig_srcrev = d.getVar('SRCREV%s' % suffix, False)
961 orig_srcrev = d.getVar('SRCREV_%s' % name, False) 961 if orig_srcrev:
962 if orig_srcrev: 962 f.write('# SRCREV%s = "%s"\n' % (suffix, orig_srcrev))
963 f.write('# SRCREV_%s = "%s"\n' % (name, orig_srcrev)) 963 f.write('SRCREV%s = "%s"\n' % (suffix, srcrev))
964 f.write('SRCREV_%s = "%s"\n' % (name, srcrev)) 964 for name, srcrev in sorted(tag_srcrevs.items()):
965 else: 965 f.write('# tag_%s = "%s"\n' % (name, srcrev))
966 f.write('SRCREV = "%s"\n' % next(iter(srcrevs.values()))) 966 if name in old_tag_srcrevs and old_tag_srcrevs[name] != srcrev:
967 if len(tag_srcrevs) > 0: 967 pkg = d.getVar('PN')
968 for name, srcrev in sorted(tag_srcrevs.items()): 968 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))
969 f.write('# tag_%s = "%s"\n' % (name, srcrev))
970 if name in old_tag_srcrevs and old_tag_srcrevs[name] != srcrev:
971 pkg = d.getVar('PN')
972 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))
973 969
974 else: 970 else:
975 if os.path.exists(srcrevfile): 971 if os.path.exists(srcrevfile):