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 96a8e6beee..472423fdc8 100644 --- a/bitbake/lib/bb/cookerdata.py +++ b/bitbake/lib/bb/cookerdata.py | |||
| @@ -13,6 +13,7 @@ import logging | |||
| 13 | import os | 13 | import os |
| 14 | import re | 14 | import re |
| 15 | import sys | 15 | import sys |
| 16 | import hashlib | ||
| 16 | from functools import wraps | 17 | from functools import wraps |
| 17 | import bb | 18 | import bb |
| 18 | from bb import data | 19 | from 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: |
