[oe-commits] [bitbake] branch 1.40 updated: cookerdata: Add mc conffiles hashes to cache hash
git at git.openembedded.org
git at git.openembedded.org
Thu Oct 10 15:53:58 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch 1.40
in repository bitbake.
The following commit(s) were added to refs/heads/1.40 by this push:
new 6b045e0 cookerdata: Add mc conffiles hashes to cache hash
6b045e0 is described below
commit 6b045e074c6fea97d4e305a5a3c8bf82135d95eb
Author: Joshua Watt <jpewhacker at gmail.com>
AuthorDate: Mon Sep 23 13:21:11 2019 -0500
cookerdata: Add mc conffiles hashes to cache hash
The variable values that result from parsing multiconfig should be
included in the cooker data hash, otherwise changes to these files won't
be detected, which will allow the parsing cache to be loaded with the
old values for the multiconfigs. This can either manifest as the
variable values simply not updating, or getting basehash changed errors
when building.
This bug was previously undetected because all of the multiconfig base
files were a direct file dependency in all parsed recipes. This was
fixed in 34137a00f60 ("bitbake: bitbake: cooker: Rename __depends in all
multiconfigs"), exposing this bug.
[YOCTO #13541]
Signed-off-by: Joshua Watt <JPEWhacker at gmail.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/cookerdata.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lib/bb/cookerdata.py b/lib/bb/cookerdata.py
index 5df66e6..d9887c7 100644
--- a/lib/bb/cookerdata.py
+++ b/lib/bb/cookerdata.py
@@ -26,6 +26,7 @@ import logging
import os
import re
import sys
+import hashlib
from functools import wraps
import bb
from bb import data
@@ -279,6 +280,7 @@ class CookerDataBuilder(object):
self.mcdata = {}
def parseBaseConfiguration(self):
+ data_hash = hashlib.sha256()
try:
bb.parse.init_parser(self.basedata)
self.data = self.parseConfigurationFiles(self.prefiles, self.postfiles)
@@ -302,7 +304,7 @@ class CookerDataBuilder(object):
bb.event.fire(bb.event.ConfigParsed(), self.data)
bb.parse.init_parser(self.data)
- self.data_hash = self.data.get_hash()
+ data_hash.update(self.data.get_hash().encode('utf-8'))
self.mcdata[''] = self.data
multiconfig = (self.data.getVar("BBMULTICONFIG") or "").split()
@@ -310,9 +312,11 @@ class CookerDataBuilder(object):
mcdata = self.parseConfigurationFiles(self.prefiles, self.postfiles, config)
bb.event.fire(bb.event.ConfigParsed(), mcdata)
self.mcdata[config] = mcdata
+ data_hash.update(mcdata.get_hash().encode('utf-8'))
if multiconfig:
bb.event.fire(bb.event.MultiConfigParsed(self.mcdata), self.data)
+ self.data_hash = data_hash.hexdigest()
except (SyntaxError, bb.BBHandledException):
raise bb.BBHandledException
except bb.data_smart.ExpansionError as e:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list