summaryrefslogtreecommitdiffstats
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)
downloadpoky-77d52cb1b8310251e7b33cf16eb00dab7d8cc7ad.tar.gz
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 58ada52290..ef8af4e0da 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -52,8 +52,8 @@ class Cache:
52 52
53 53
54 self.cachedir = bb.data.getVar("CACHE", data, True) 54 self.cachedir = bb.data.getVar("CACHE", data, True)
55 self.clean = {} 55 self.clean = set()
56 self.checked = {} 56 self.checked = set()
57 self.depends_cache = {} 57 self.depends_cache = {}
58 self.data = None 58 self.data = None
59 self.data_fn = None 59 self.data_fn = None
@@ -242,10 +242,10 @@ class Cache:
242 if not self.has_cache: 242 if not self.has_cache:
243 return False 243 return False
244 244
245 self.checked[fn] = "" 245 self.checked.add(fn)
246 246
247 # Pretend we're clean so getVar works 247 # Pretend we're clean so getVar works
248 self.clean[fn] = "" 248 self.clean.add(fn)
249 249
250 # File isn't in depends_cache 250 # File isn't in depends_cache
251 if not fn in self.depends_cache: 251 if not fn in self.depends_cache:
@@ -282,15 +282,13 @@ class Cache:
282 self.remove(fn) 282 self.remove(fn)
283 return False 283 return False
284 284
285 if not fn in self.clean: 285 self.clean.add(fn)
286 self.clean[fn] = ""
287
288 invalid = False 286 invalid = False
289 # Mark extended class data as clean too 287 # Mark extended class data as clean too
290 multi = self.getVar('__VARIANTS', fn, True) 288 multi = self.getVar('__VARIANTS', fn, True)
291 for cls in (multi or "").split(): 289 for cls in (multi or "").split():
292 virtualfn = self.realfn2virtual(fn, cls) 290 virtualfn = self.realfn2virtual(fn, cls)
293 self.clean[virtualfn] = "" 291 self.clean.add(virtualfn)
294 if not virtualfn in self.depends_cache: 292 if not virtualfn in self.depends_cache:
295 logger.debug(2, "Cache: %s is not cached", virtualfn) 293 logger.debug(2, "Cache: %s is not cached", virtualfn)
296 invalid = True 294 invalid = True
@@ -301,10 +299,10 @@ class Cache:
301 virtualfn = self.realfn2virtual(fn, cls) 299 virtualfn = self.realfn2virtual(fn, cls)
302 if virtualfn in self.clean: 300 if virtualfn in self.clean:
303 logger.debug(2, "Cache: Removing %s from cache", virtualfn) 301 logger.debug(2, "Cache: Removing %s from cache", virtualfn)
304 del self.clean[virtualfn] 302 self.clean.remove(virtualfn)
305 if fn in self.clean: 303 if fn in self.clean:
306 logger.debug(2, "Cache: Marking %s as not clean", fn) 304 logger.debug(2, "Cache: Marking %s as not clean", fn)
307 del self.clean[fn] 305 self.clean.remove(fn)
308 return False 306 return False
309 307
310 return True 308 return True
@@ -319,7 +317,7 @@ class Cache:
319 del self.depends_cache[fn] 317 del self.depends_cache[fn]
320 if fn in self.clean: 318 if fn in self.clean:
321 logger.debug(1, "Marking %s as unclean", fn) 319 logger.debug(1, "Marking %s as unclean", fn)
322 del self.clean[fn] 320 self.clean.remove(fn)
323 321
324 def sync(self): 322 def sync(self):
325 """ 323 """