]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
buildhistory: force writing SRCREV values
authorEd Bartosh <ed.bartosh@linux.intel.com>
Mon, 12 Jun 2017 08:11:54 +0000 (11:11 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 12 Jun 2017 14:04:26 +0000 (15:04 +0100)
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]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/buildhistory.bbclass

index 74b837e974128d444cc92145c7d82fef3ceefb35..64cd31ae2b7dd21b7c431443ca8447a2ba6a99bd 100644 (file)
@@ -336,6 +336,7 @@ def write_recipehistory(rcpinfo, d):
         f.write(u"PACKAGES = %s\n" %  rcpinfo.packages)
         f.write(u"LAYER = %s\n" %  rcpinfo.layer)
 
+    write_latest_srcrev(d, pkghistdir)
 
 def write_pkghistory(pkginfo, d):
     bb.debug(2, "Writing package history for package %s" % pkginfo.name)
@@ -856,7 +857,10 @@ def _get_srcrev_values(d):
 do_fetch[postfuncs] += "write_srcrev"
 do_fetch[vardepsexclude] += "write_srcrev"
 python write_srcrev() {
-    pkghistdir = d.getVar('BUILDHISTORY_DIR_PACKAGE')
+    write_latest_srcrev(d, d.getVar('BUILDHISTORY_DIR_PACKAGE'))
+}
+
+def write_latest_srcrev(d, pkghistdir):
     srcrevfile = os.path.join(pkghistdir, 'latest_srcrev')
 
     srcrevs, tag_srcrevs = _get_srcrev_values(d)
@@ -894,4 +898,3 @@ python write_srcrev() {
     else:
         if os.path.exists(srcrevfile):
             os.remove(srcrevfile)
-}