summaryrefslogtreecommitdiffstats
path: root/lib/bb/cache.py
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-01-03 00:00:37 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-01-03 00:00:37 +0000
commit6bca82b5b9426d079a4b216ddcfa60dd76ebda9a (patch)
treec6555d577e2393ef4f3f0a965a7fc3edeffdb85c /lib/bb/cache.py
parent0eb1c4d7aafcd10843d3ca18ed225b0734b1ec56 (diff)
downloadbitbake-6bca82b5b9426d079a4b216ddcfa60dd76ebda9a.tar.gz
cache.py: Simplfy logic (from Poky)
Diffstat (limited to 'lib/bb/cache.py')
-rw-r--r--lib/bb/cache.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index a4a4f47ce..a6b81333d 100644
--- a/lib/bb/cache.py
+++ b/lib/bb/cache.py
@@ -59,18 +59,16 @@ class Cache:
if self.cachedir in [None, '']:
self.has_cache = False
bb.msg.note(1, bb.msg.domain.Cache, "Not using a cache. Set CACHE = <directory> to enable.")
- else:
- self.has_cache = True
- 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 )
+ return
- if not self.has_cache:
- return
+ self.has_cache = True
+ 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 any of configuration.data's dependencies are newer than the
# cache there isn't even any point in loading it...