[oe-commits] [bitbake] 05/06: cache: Add better cache loading sanity checks
git at git.openembedded.org
git at git.openembedded.org
Fri Jul 22 10:41:51 UTC 2016
rpurdie pushed a commit to branch master-next
in repository bitbake.
commit 4be4a15491530bd6dc018033ad3d4b2562ab6e23
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Fri Jul 22 11:28:23 2016 +0100
cache: Add better cache loading sanity checks
We've seen cache corruption where the pairs come out in a different
order to the way we saved them for unknown reasons. Add better sanity
checking to give a more user friendly error rather than a crash/traceback.
Also allows the system to reparse and recover.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/cache.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index cce12d1..439565f 100644
--- a/lib/bb/cache.py
+++ b/lib/bb/cache.py
@@ -328,6 +328,13 @@ class Cache(object):
value = pickled.load()
except Exception:
break
+ if not isinstance(key, str):
+ bb.warn("%s from extras cache is not a string?" % key)
+ break
+ if not isinstance(value, RecipeInfoCommon):
+ bb.warn("%s from extras cache is not a RecipeInfoCommon class?" % value)
+ break
+
if key in self.depends_cache:
self.depends_cache[key].append(value)
else:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list