cache: use os.path ops instead of stat
(Bitbake rev: 09fe0d403c75229931c10eabc7eecc0dc60058fe) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
parent
9d32ff0c87
commit
81d13cbebe
|
@ -64,10 +64,7 @@ class Cache:
|
||||||
self.cachefile = os.path.join(self.cachedir, "bb_cache.dat")
|
self.cachefile = os.path.join(self.cachedir, "bb_cache.dat")
|
||||||
|
|
||||||
bb.msg.debug(1, bb.msg.domain.Cache, "Using cache in '%s'" % self.cachedir)
|
bb.msg.debug(1, bb.msg.domain.Cache, "Using cache in '%s'" % self.cachedir)
|
||||||
try:
|
bb.mkdirhier(self.cachedir)
|
||||||
os.stat( self.cachedir )
|
|
||||||
except OSError:
|
|
||||||
bb.mkdirhier( self.cachedir )
|
|
||||||
|
|
||||||
# If any of configuration.data's dependencies are newer than the
|
# If any of configuration.data's dependencies are newer than the
|
||||||
# cache there isn't even any point in loading it...
|
# cache there isn't even any point in loading it...
|
||||||
|
@ -92,11 +89,8 @@ class Cache:
|
||||||
bb.msg.note(1, bb.msg.domain.Cache, "Invalid cache found, rebuilding...")
|
bb.msg.note(1, bb.msg.domain.Cache, "Invalid cache found, rebuilding...")
|
||||||
self.depends_cache = {}
|
self.depends_cache = {}
|
||||||
else:
|
else:
|
||||||
try:
|
if os.path.isfile(self.cachefile):
|
||||||
os.stat( self.cachefile )
|
|
||||||
bb.msg.note(1, bb.msg.domain.Cache, "Out of date cache found, rebuilding...")
|
bb.msg.note(1, bb.msg.domain.Cache, "Out of date cache found, rebuilding...")
|
||||||
except OSError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def getVar(self, var, fn, exp = 0):
|
def getVar(self, var, fn, exp = 0):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue