<div dir="ltr"><div><div><div><div>Please hold merging this change.<br><br></div>I think we need to discuss a bit on this. My expectation is that the Bitbake server will reinit its state between builds, re-parsing the configuration files and reload the cache.<br>
</div><div>I am not sure why we would consider maintaining the hot cache copy in memory between builds.<br></div><div><br></div>The patch for bug <a href="https://bugzilla.yoctoproject.org/show_bug.cgi?id=5535">https://bugzilla.yoctoproject.org/show_bug.cgi?id=5535</a> will re-create the exact same scenario that we try to change through this patch, so <br>
</div>I think we need to clarify the issue before moving forward.<br><br></div>Thanks,<br>Alex<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 26, 2014 at 8:05 AM, Cristiana Voicu <span dir="ltr"><<a href="mailto:cristiana.voicu@intel.com" target="_blank">cristiana.voicu@intel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Due to commit dd15648fc2654b8d7c3e00ea7ab3dbf04f24f24b, after an async<br>
command is executed, the state of the server is set back to state.initial,<br>
so the cache is always reloaded.<br>
This patch adds a sanity check on the validity of the cache and then only<br>
reload if something has changed.<br>
depends_cache variable is needed in this case, so the del statement needs<br>
to be removed.<br>
<br>
[YOCTO #5603]<br>
Signed-off-by: Cristiana Voicu <<a href="mailto:cristiana.voicu@intel.com">cristiana.voicu@intel.com</a>><br>
---<br>
bitbake/lib/bb/cache.py | 2 --<br>
bitbake/lib/bb/cooker.py | 32 ++++++++++++++++++++++----------<br>
2 files changed, 22 insertions(+), 12 deletions(-)<br>
<br>
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py<br>
index 318781b..da9ad5d 100644<br>
--- a/bitbake/lib/bb/cache.py<br>
+++ b/bitbake/lib/bb/cache.py<br>
@@ -612,8 +612,6 @@ class Cache(object):<br>
cache_class_name = cache_class.__name__<br>
file_dict[cache_class_name].close()<br>
<br>
- del self.depends_cache<br>
-<br>
@staticmethod<br>
def mtime(cachefile):<br>
return bb.parse.cached_mtime_noerror(cachefile)<br>
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py<br>
index 07202e3..c90bb44 100644<br>
--- a/bitbake/lib/bb/cooker.py<br>
+++ b/bitbake/lib/bb/cooker.py<br>
@@ -1265,21 +1265,33 @@ class BBCooker:<br>
raise bb.BBHandledException()<br>
<br>
if self.state != state.parsing:<br>
- self.parseConfiguration ()<br>
+ check_cache = False<br>
+ if self.parser:<br>
+ self.parser.bb_cache.checked = set()<br>
+ for filename in self.parser.filelist:<br>
+ appends = self.collection.get_file_appends(filename)<br>
+ if not self.parser.bb_cache.cacheValid(filename, appends):<br>
+ check_cache = True<br>
+ break<br>
+ else:<br>
+ check_cache = True<br>
<br>
- ignore = self.data.getVar("ASSUME_PROVIDED", True) or ""<br>
- self.recipecache.ignored_dependencies = set(ignore.split())<br>
+ if check_cache:<br>
+ self.parseConfiguration ()<br>
+<br>
+ ignore = self.data.getVar("ASSUME_PROVIDED", True) or ""<br>
+ self.recipecache.ignored_dependencies = set(ignore.split())<br>
<br>
- for dep in self.configuration.extra_assume_provided:<br>
- self.recipecache.ignored_dependencies.add(dep)<br>
+ for dep in self.configuration.extra_assume_provided:<br>
+ self.recipecache.ignored_dependencies.add(dep)<br>
<br>
- self.collection = CookerCollectFiles(self.recipecache.bbfile_config_priorities)<br>
- (filelist, masked) = self.collection.collect_bbfiles(self.data, self.event_data)<br>
+ self.collection = CookerCollectFiles(self.recipecache.bbfile_config_priorities)<br>
+ (filelist, masked) = self.collection.collect_bbfiles(self.data, self.event_data)<br>
<br>
- self.data.renameVar("__depends", "__base_depends")<br>
+ self.data.renameVar("__depends", "__base_depends")<br>
<br>
- self.parser = CookerParser(self, filelist, masked)<br>
- self.state = state.parsing<br>
+ self.parser = CookerParser(self, filelist, masked)<br>
+ self.state = state.parsing<br>
<br>
if not self.parser.parse_next():<br>
collectlog.debug(1, "parsing complete")<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.9.5<br>
<br>
--<br>
_______________________________________________<br>
bitbake-devel mailing list<br>
<a href="mailto:bitbake-devel@lists.openembedded.org">bitbake-devel@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/bitbake-devel" target="_blank">http://lists.openembedded.org/mailman/listinfo/bitbake-devel</a><br>
</font></span></blockquote></div><br></div>