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 e43e71f90f..64df432f13 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass | |||
| @@ -970,23 +970,19 @@ def write_latest_srcrev(d, pkghistdir): | |||
| 970 | value = value.replace('"', '').strip() | 970 | value = value.replace('"', '').strip() |
| 971 | old_tag_srcrevs[key] = value | 971 | old_tag_srcrevs[key] = value |
| 972 | with open(srcrevfile, 'w') as f: | 972 | with open(srcrevfile, 'w') as f: |
| 973 | orig_srcrev = d.getVar('SRCREV', False) or 'INVALID' | 973 | for name, srcrev in sorted(srcrevs.items()): |
| 974 | if orig_srcrev != 'INVALID': | 974 | suffix = "_" + name |
| 975 | f.write('# SRCREV = "%s"\n' % orig_srcrev) | 975 | if name == "default": |
| 976 | if len(srcrevs) > 1: | 976 | suffix = "" |
| 977 | for name, srcrev in sorted(srcrevs.items()): | 977 | orig_srcrev = d.getVar('SRCREV%s' % suffix, False) |
| 978 | orig_srcrev = d.getVar('SRCREV_%s' % name, False) | 978 | if orig_srcrev: |
| 979 | if orig_srcrev: | 979 | f.write('# SRCREV%s = "%s"\n' % (suffix, orig_srcrev)) |
| 980 | f.write('# SRCREV_%s = "%s"\n' % (name, orig_srcrev)) | 980 | f.write('SRCREV%s = "%s"\n' % (suffix, srcrev)) |
| 981 | f.write('SRCREV_%s = "%s"\n' % (name, srcrev)) | 981 | for name, srcrev in sorted(tag_srcrevs.items()): |
| 982 | else: | 982 | f.write('# tag_%s = "%s"\n' % (name, srcrev)) |
| 983 | f.write('SRCREV = "%s"\n' % next(iter(srcrevs.values()))) | 983 | if name in old_tag_srcrevs and old_tag_srcrevs[name] != srcrev: |
| 984 | if len(tag_srcrevs) > 0: | 984 | pkg = d.getVar('PN') |
| 985 | for name, srcrev in sorted(tag_srcrevs.items()): | 985 | 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)) |
| 986 | f.write('# tag_%s = "%s"\n' % (name, srcrev)) | ||
| 987 | if name in old_tag_srcrevs and old_tag_srcrevs[name] != srcrev: | ||
| 988 | pkg = d.getVar('PN') | ||
| 989 | 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)) | ||
| 990 | 986 | ||
| 991 | else: | 987 | else: |
| 992 | if os.path.exists(srcrevfile): | 988 | if os.path.exists(srcrevfile): |
