summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2018-02-01 23:15:26 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-02-14 15:26:03 +0000
commitf72a121233b0267556859b56611b57215e0b7fbb (patch)
tree2e3942dccc5ed23bb372d2f281cef05c18476dae /bitbake/lib/bb
parentafbc3f44273fcc252cb31554c23011d8fdde3138 (diff)
downloadpoky-f72a121233b0267556859b56611b57215e0b7fbb.tar.gz
bitbake: bitbake: cache: improve debug message
* Print message when cachefile is found/not can help debug. * Update "Using cache in" to "Cache dir:" since it was the same as the debug message of "codeparser & file checksum caches", which caused confusion. And whether the cache file will be used or not is still unknown at that time, so just print the cache dir. (Bitbake rev: c8d3a2016f432e8ed9e99d9c28850149ab6fd6d8) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/cache.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 86ce0e7861..168a77ac0c 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -395,7 +395,7 @@ class Cache(NoCache):
395 self.has_cache = True 395 self.has_cache = True
396 self.cachefile = getCacheFile(self.cachedir, "bb_cache.dat", self.data_hash) 396 self.cachefile = getCacheFile(self.cachedir, "bb_cache.dat", self.data_hash)
397 397
398 logger.debug(1, "Using cache in '%s'", self.cachedir) 398 logger.debug(1, "Cache dir: %s", self.cachedir)
399 bb.utils.mkdirhier(self.cachedir) 399 bb.utils.mkdirhier(self.cachedir)
400 400
401 cache_ok = True 401 cache_ok = True
@@ -408,6 +408,8 @@ class Cache(NoCache):
408 self.load_cachefile() 408 self.load_cachefile()
409 elif os.path.isfile(self.cachefile): 409 elif os.path.isfile(self.cachefile):
410 logger.info("Out of date cache found, rebuilding...") 410 logger.info("Out of date cache found, rebuilding...")
411 else:
412 logger.debug(1, "Cache file %s not found, building..." % self.cachefile)
411 413
412 def load_cachefile(self): 414 def load_cachefile(self):
413 cachesize = 0 415 cachesize = 0
@@ -424,6 +426,7 @@ class Cache(NoCache):
424 426
425 for cache_class in self.caches_array: 427 for cache_class in self.caches_array:
426 cachefile = getCacheFile(self.cachedir, cache_class.cachefile, self.data_hash) 428 cachefile = getCacheFile(self.cachedir, cache_class.cachefile, self.data_hash)
429 logger.debug(1, 'Loading cache file: %s' % cachefile)
427 with open(cachefile, "rb") as cachefile: 430 with open(cachefile, "rb") as cachefile:
428 pickled = pickle.Unpickler(cachefile) 431 pickled = pickle.Unpickler(cachefile)
429 # Check cache version information 432 # Check cache version information