From: "Joshua Watt" <JPEWhacker@gmail.com>
To: bitbake-devel@lists.openembedded.org
Cc: richard.purdie@linuxfoundation.org, Joshua Watt <JPEWhacker@gmail.com>
Subject: [bitbake-devel][PATCH] bitbake: cache: Fix error when cache is rebuilt
Date: Mon, 8 Jun 2020 16:03:10 -0500 [thread overview]
Message-ID: <20200608210310.13756-1-JPEWhacker@gmail.com> (raw)
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>
---
bitbake/lib/bb/cache.py | 6 +++---
1 file 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):
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
--
2.26.2
reply other threads:[~2020-06-08 21:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200608210310.13756-1-JPEWhacker@gmail.com \
--to=jpewhacker@gmail.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.