summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/cache.py
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2020-06-08 16:03:10 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-06-10 12:30:01 +0100
commitc3271dca21b2f6fa9b54b00a64a176e9d87e8feb (patch)
tree3182815d687f8f8147db681007eb4090f921a551 /bitbake/lib/bb/cache.py
parent0ecab7a461d7dc47cbd8f277019d87ee3df31283 (diff)
downloadpoky-c3271dca21b2f6fa9b54b00a64a176e9d87e8feb.tar.gz
bitbake: bitbake: cache: Fix error when cache is rebuilt
It is expected that load_cachfile() returns an integer indicating how many entries were loaded from the cache. In the event the cache needs to be rebuilt, 0 must be returned to prevent python from attempting to add an None and an integer together. (Bitbake rev: 3459d98fbc280637ecb36961bda8436818ee51e5) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cache.py')
-rw-r--r--bitbake/lib/bb/cache.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index df78d5b701..be5ea6a8bd 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -464,14 +464,14 @@ class Cache(NoCache):
464 bitbake_ver = pickled.load() 464 bitbake_ver = pickled.load()
465 except Exception: 465 except Exception:
466 self.logger.info('Invalid cache, rebuilding...') 466 self.logger.info('Invalid cache, rebuilding...')
467 return 467 return 0
468 468
469 if cache_ver != __cache_version__: 469 if cache_ver != __cache_version__:
470 self.logger.info('Cache version mismatch, rebuilding...') 470 self.logger.info('Cache version mismatch, rebuilding...')
471 return 471 return 0
472 elif bitbake_ver != bb.__version__: 472 elif bitbake_ver != bb.__version__:
473 self.logger.info('Bitbake version mismatch, rebuilding...') 473 self.logger.info('Bitbake version mismatch, rebuilding...')
474 return 474 return 0
475 475
476 # Load the rest of the cache file 476 # Load the rest of the cache file
477 current_progress = 0 477 current_progress = 0