summaryrefslogtreecommitdiffstats
path: root/meta/classes/buildhistory.bbclass
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2017-06-12 11:11:54 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-12 15:08:32 +0100
commit62f46290669357c01b874bc82a3c4e927156e299 (patch)
tree92ffa50eb7f2873feed441222792f1d33648ad4d /meta/classes/buildhistory.bbclass
parent437f9cdbaf082974a2a0c1d17e1010b6fab9fe91 (diff)
downloadpoky-62f46290669357c01b874bc82a3c4e927156e299.tar.gz
buildhistory: force writing SRCREV values
Enabling SSTATE_MIRRORS sometimes causes SRCREV values not to be written/updated in the build history. This happens more often if SRCREV is set to ${AUTOREV} Explicitly writing SRCREVs when recipe history is being written should fix this. [YOCTO #10948] (From OE-Core rev: df74b97599a789db742fc7588009783f5f37ebff) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/buildhistory.bbclass')
-rw-r--r--meta/classes/buildhistory.bbclass7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 74b837e974..64cd31ae2b 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -336,6 +336,7 @@ def write_recipehistory(rcpinfo, d):
336 f.write(u"PACKAGES = %s\n" % rcpinfo.packages) 336 f.write(u"PACKAGES = %s\n" % rcpinfo.packages)
337 f.write(u"LAYER = %s\n" % rcpinfo.layer) 337 f.write(u"LAYER = %s\n" % rcpinfo.layer)
338 338
339 write_latest_srcrev(d, pkghistdir)
339 340
340def write_pkghistory(pkginfo, d): 341def write_pkghistory(pkginfo, d):
341 bb.debug(2, "Writing package history for package %s" % pkginfo.name) 342 bb.debug(2, "Writing package history for package %s" % pkginfo.name)
@@ -856,7 +857,10 @@ def _get_srcrev_values(d):
856do_fetch[postfuncs] += "write_srcrev" 857do_fetch[postfuncs] += "write_srcrev"
857do_fetch[vardepsexclude] += "write_srcrev" 858do_fetch[vardepsexclude] += "write_srcrev"
858python write_srcrev() { 859python write_srcrev() {
859 pkghistdir = d.getVar('BUILDHISTORY_DIR_PACKAGE') 860 write_latest_srcrev(d, d.getVar('BUILDHISTORY_DIR_PACKAGE'))
861}
862
863def write_latest_srcrev(d, pkghistdir):
860 srcrevfile = os.path.join(pkghistdir, 'latest_srcrev') 864 srcrevfile = os.path.join(pkghistdir, 'latest_srcrev')
861 865
862 srcrevs, tag_srcrevs = _get_srcrev_values(d) 866 srcrevs, tag_srcrevs = _get_srcrev_values(d)
@@ -894,4 +898,3 @@ python write_srcrev() {
894 else: 898 else:
895 if os.path.exists(srcrevfile): 899 if os.path.exists(srcrevfile):
896 os.remove(srcrevfile) 900 os.remove(srcrevfile)
897}