diff options
| -rw-r--r-- | bitbake/lib/bb/cookerdata.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cookerdata.py b/bitbake/lib/bb/cookerdata.py index 50b6b6bd3a..9ad97f4f38 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/lib/bb/cookerdata.py | |||
| @@ -16,6 +16,7 @@ import logging | |||
| 16 | import os | 16 | import os |
| 17 | import re | 17 | import re |
| 18 | import sys | 18 | import sys |
| 19 | import hashlib | ||
| 19 | from functools import wraps | 20 | from functools import wraps |
| 20 | import bb | 21 | import bb |
| 21 | from bb import data | 22 | from bb import data |
| @@ -269,6 +270,7 @@ class CookerDataBuilder(object): | |||
| 269 | self.mcdata = {} | 270 | self.mcdata = {} |
| 270 | 271 | ||
| 271 | def parseBaseConfiguration(self): | 272 | def parseBaseConfiguration(self): |
| 273 | data_hash = hashlib.sha256() | ||
| 272 | try: | 274 | try: |
| 273 | bb.parse.init_parser(self.basedata) | 275 | bb.parse.init_parser(self.basedata) |
| 274 | self.data = self.parseConfigurationFiles(self.prefiles, self.postfiles) | 276 | self.data = self.parseConfigurationFiles(self.prefiles, self.postfiles) |
| @@ -292,7 +294,7 @@ class CookerDataBuilder(object): | |||
| 292 | bb.event.fire(bb.event.ConfigParsed(), self.data) | 294 | bb.event.fire(bb.event.ConfigParsed(), self.data) |
| 293 | 295 | ||
| 294 | bb.parse.init_parser(self.data) | 296 | bb.parse.init_parser(self.data) |
| 295 | self.data_hash = self.data.get_hash() | 297 | data_hash.update(self.data.get_hash().encode('utf-8')) |
| 296 | self.mcdata[''] = self.data | 298 | self.mcdata[''] = self.data |
| 297 | 299 | ||
| 298 | multiconfig = (self.data.getVar("BBMULTICONFIG") or "").split() | 300 | multiconfig = (self.data.getVar("BBMULTICONFIG") or "").split() |
| @@ -300,9 +302,11 @@ class CookerDataBuilder(object): | |||
| 300 | mcdata = self.parseConfigurationFiles(self.prefiles, self.postfiles, config) | 302 | mcdata = self.parseConfigurationFiles(self.prefiles, self.postfiles, config) |
| 301 | bb.event.fire(bb.event.ConfigParsed(), mcdata) | 303 | bb.event.fire(bb.event.ConfigParsed(), mcdata) |
| 302 | self.mcdata[config] = mcdata | 304 | self.mcdata[config] = mcdata |
| 305 | data_hash.update(mcdata.get_hash().encode('utf-8')) | ||
| 303 | if multiconfig: | 306 | if multiconfig: |
| 304 | bb.event.fire(bb.event.MultiConfigParsed(self.mcdata), self.data) | 307 | bb.event.fire(bb.event.MultiConfigParsed(self.mcdata), self.data) |
| 305 | 308 | ||
| 309 | self.data_hash = data_hash.hexdigest() | ||
| 306 | except (SyntaxError, bb.BBHandledException): | 310 | except (SyntaxError, bb.BBHandledException): |
| 307 | raise bb.BBHandledException | 311 | raise bb.BBHandledException |
| 308 | except bb.data_smart.ExpansionError as e: | 312 | except bb.data_smart.ExpansionError as e: |
