diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2020-06-08 16:03:10 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-08 22:21:23 +0100 |
commit | 3459d98fbc280637ecb36961bda8436818ee51e5 (patch) | |
tree | 4a35501115f2d4ef41e426151e6e68945b0f384a | |
parent | 325827af66434affc2da460cc8b9a5c460e38056 (diff) | |
download | bitbake-3459d98fbc280637ecb36961bda8436818ee51e5.tar.gz |
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.
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/cache.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bb/cache.py b/lib/bb/cache.py index df78d5b70..be5ea6a8b 100644 --- a/lib/bb/cache.py +++ b/lib/bb/cache.py @@ -464,14 +464,14 @@ class Cache(NoCache): bitbake_ver = pickled.load() except Exception: self.logger.info('Invalid cache, rebuilding...') - return + return 0 if cache_ver != __cache_version__: self.logger.info('Cache version mismatch, rebuilding...') - return + return 0 elif bitbake_ver != bb.__version__: self.logger.info('Bitbake version mismatch, rebuilding...') - return + return 0 # Load the rest of the cache file current_progress = 0 |