summaryrefslogtreecommitdiff
path: root/bitbake
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-11-16 17:43:33 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:46:40 +0000
commit77d52cb1b8310251e7b33cf16eb00dab7d8cc7ad (patch)
treec3ec3c001bc2b3f0e2e6ab41434cc58d5d2bf731 /bitbake
parentf207bb7c9345bbf822617efe85a1be34b4e670b3 (diff)
downloadopenembedded-core-77d52cb1b8310251e7b33cf16eb00dab7d8cc7ad.tar.gz
openembedded-core-77d52cb1b8310251e7b33cf16eb00dab7d8cc7ad.tar.bz2
openembedded-core-77d52cb1b8310251e7b33cf16eb00dab7d8cc7ad.tar.xz
openembedded-core-77d52cb1b8310251e7b33cf16eb00dab7d8cc7ad.zip
cache: use set for clean, checked
(Bitbake rev: 3a776ef947e23b1a04bdd9e78a3a0c4616249b0e) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cache.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 58ada5229..ef8af4e0d 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -52,8 +52,8 @@ class Cache:
self.cachedir = bb.data.getVar("CACHE", data, True)
- self.clean = {}
- self.checked = {}
+ self.clean = set()
+ self.checked = set()
self.depends_cache = {}
self.data = None
self.data_fn = None
@@ -242,10 +242,10 @@ class Cache:
if not self.has_cache:
return False
- self.checked[fn] = ""
+ self.checked.add(fn)
# Pretend we're clean so getVar works
- self.clean[fn] = ""
+ self.clean.add(fn)
# File isn't in depends_cache
if not fn in self.depends_cache:
@@ -282,15 +282,13 @@ class Cache:
self.remove(fn)
return False
- if not fn in self.clean:
- self.clean[fn] = ""
-
+ self.clean.add(fn)
invalid = False
# Mark extended class data as clean too
multi = self.getVar('__VARIANTS', fn, True)
for cls in (multi or "").split():
virtualfn = self.realfn2virtual(fn, cls)
- self.clean[virtualfn] = ""
+ self.clean.add(virtualfn)
if not virtualfn in self.depends_cache:
logger.debug(2, "Cache: %s is not cached", virtualfn)
invalid = True
@@ -301,10 +299,10 @@ class Cache:
virtualfn = self.realfn2virtual(fn, cls)
if virtualfn in self.clean:
logger.debug(2, "Cache: Removing %s from cache", virtualfn)
- del self.clean[virtualfn]
+ self.clean.remove(virtualfn)
if fn in self.clean:
logger.debug(2, "Cache: Marking %s as not clean", fn)
- del self.clean[fn]
+ self.clean.remove(fn)
return False
return True
@@ -319,7 +317,7 @@ class Cache:
del self.depends_cache[fn]
if fn in self.clean:
logger.debug(1, "Marking %s as unclean", fn)
- del self.clean[fn]
+ self.clean.remove(fn)
def sync(self):
"""