summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2019-09-23 13:21:11 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-09-27 13:02:19 +0100
commitf971d6ae2e80912f4513c815b2f2fb9909c55aaa (patch)
tree4866070faaa0cf46b983727dba55c18b949e1f6a /bitbake
parentdaa6dcfc397ca360a3fdfef6bf1f642e6b545ae5 (diff)
downloadpoky-f971d6ae2e80912f4513c815b2f2fb9909c55aaa.tar.gz
bitbake: 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] (Bitbake rev: c74481aa15226e1bff9d53e4ee4b702ebfa1ad32) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cookerdata.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py
index 96a8e6beee..472423fdc8 100644
--- a/bitbake/lib/bb/cookerdata.py
+++ b/bitbake/lib/bb/cookerdata.py
@@ -13,6 +13,7 @@ import logging
13import os 13import os
14import re 14import re
15import sys 15import sys
16import hashlib
16from functools import wraps 17from functools import wraps
17import bb 18import bb
18from bb import data 19from bb import data
@@ -267,6 +268,7 @@ class CookerDataBuilder(object):
267 self.mcdata = {} 268 self.mcdata = {}
268 269
269 def parseBaseConfiguration(self): 270 def parseBaseConfiguration(self):
271 data_hash = hashlib.sha256()
270 try: 272 try:
271 self.data = self.parseConfigurationFiles(self.prefiles, self.postfiles) 273 self.data = self.parseConfigurationFiles(self.prefiles, self.postfiles)
272 274
@@ -290,7 +292,7 @@ class CookerDataBuilder(object):
290 bb.event.fire(bb.event.ConfigParsed(), self.data) 292 bb.event.fire(bb.event.ConfigParsed(), self.data)
291 293
292 bb.parse.init_parser(self.data) 294 bb.parse.init_parser(self.data)
293 self.data_hash = self.data.get_hash() 295 data_hash.update(self.data.get_hash().encode('utf-8'))
294 self.mcdata[''] = self.data 296 self.mcdata[''] = self.data
295 297
296 multiconfig = (self.data.getVar("BBMULTICONFIG") or "").split() 298 multiconfig = (self.data.getVar("BBMULTICONFIG") or "").split()
@@ -298,9 +300,11 @@ class CookerDataBuilder(object):
298 mcdata = self.parseConfigurationFiles(self.prefiles, self.postfiles, config) 300 mcdata = self.parseConfigurationFiles(self.prefiles, self.postfiles, config)
299 bb.event.fire(bb.event.ConfigParsed(), mcdata) 301 bb.event.fire(bb.event.ConfigParsed(), mcdata)
300 self.mcdata[config] = mcdata 302 self.mcdata[config] = mcdata
303 data_hash.update(mcdata.get_hash().encode('utf-8'))
301 if multiconfig: 304 if multiconfig:
302 bb.event.fire(bb.event.MultiConfigParsed(self.mcdata), self.data) 305 bb.event.fire(bb.event.MultiConfigParsed(self.mcdata), self.data)
303 306
307 self.data_hash = data_hash.hexdigest()
304 except (SyntaxError, bb.BBHandledException): 308 except (SyntaxError, bb.BBHandledException):
305 raise bb.BBHandledException 309 raise bb.BBHandledException
306 except bb.data_smart.ExpansionError as e: 310 except bb.data_smart.ExpansionError as e: