diff options
Diffstat (limited to 'bitbake/lib/bb/cooker.py')
-rw-r--r-- | bitbake/lib/bb/cooker.py | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index f0f9c66f4e..fb38289397 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -1445,6 +1445,21 @@ class BBCooker: | |||
1445 | if timestamp: | 1445 | if timestamp: |
1446 | return timestr | 1446 | return timestr |
1447 | 1447 | ||
1448 | def updateCacheSync(self): | ||
1449 | if self.state == state.running: | ||
1450 | return | ||
1451 | |||
1452 | # reload files for which we got notifications | ||
1453 | for p in self.inotify_modified_files: | ||
1454 | bb.parse.update_cache(p) | ||
1455 | self.inotify_modified_files = [] | ||
1456 | |||
1457 | if not self.baseconfig_valid: | ||
1458 | logger.debug(1, "Reloading base configuration data") | ||
1459 | self.initConfigurationData() | ||
1460 | self.baseconfig_valid = True | ||
1461 | self.parsecache_valid = False | ||
1462 | |||
1448 | # This is called for all async commands when self.state != running | 1463 | # This is called for all async commands when self.state != running |
1449 | def updateCache(self): | 1464 | def updateCache(self): |
1450 | if self.state == state.running: | 1465 | if self.state == state.running: |
@@ -1456,17 +1471,7 @@ class BBCooker: | |||
1456 | raise bb.BBHandledException() | 1471 | raise bb.BBHandledException() |
1457 | 1472 | ||
1458 | if self.state != state.parsing: | 1473 | if self.state != state.parsing: |
1459 | 1474 | self.updateCacheSync() | |
1460 | # reload files for which we got notifications | ||
1461 | for p in self.inotify_modified_files: | ||
1462 | bb.parse.update_cache(p) | ||
1463 | self.inotify_modified_files = [] | ||
1464 | |||
1465 | if not self.baseconfig_valid: | ||
1466 | logger.debug(1, "Reloading base configuration data") | ||
1467 | self.initConfigurationData() | ||
1468 | self.baseconfig_valid = True | ||
1469 | self.parsecache_valid = False | ||
1470 | 1475 | ||
1471 | if self.state != state.parsing and not self.parsecache_valid: | 1476 | if self.state != state.parsing and not self.parsecache_valid: |
1472 | self.parseConfiguration () | 1477 | self.parseConfiguration () |