Signed-off-by: Bernhard Reutner-Fischer <[email protected]>
---
lib/bb/cache.py | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index 1d592a4..116411c 100644
--- a/lib/bb/cache.py
+++ b/lib/bb/cache.py
@@ -64,10 +64,11 @@ class Cache:
self.cachefile = os.path.join(self.cachedir, "bb_cache.dat")
bb.msg.debug(1, bb.msg.domain.Cache, "Using cache in '%s'" %
self.cachedir)
- try:
- os.stat( self.cachedir )
- except OSError:
- bb.mkdirhier( self.cachedir )
+ if not os.path.isdir(self.cachedir):
+ try:
+ bb.mkdirhier( self.cachedir )
+ except:
+ raise
# If any of configuration.data's dependencies are newer than the
# cache there isn't even any point in loading it...
@@ -92,11 +93,8 @@ class Cache:
bb.msg.note(1, bb.msg.domain.Cache, "Invalid cache found,
rebuilding...")
self.depends_cache = {}
else:
- try:
- os.stat( self.cachefile )
+ if os.path.isfile(self.cachefile):
bb.msg.note(1, bb.msg.domain.Cache, "Out of date cache found,
rebuilding...")
- except OSError:
- pass
def getVar(self, var, fn, exp = 0):
"""
--
1.7.1
_______________________________________________
Bitbake-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bitbake-dev