Only mark fn as clean if it is clean.
This saves us from removing (prematurely added) fn from our clean set
and saves me a few percent of runtime (and misleading debugging output
from remove()).

Signed-off-by: Bernhard Reutner-Fischer <[email protected]>
---
 lib/bb/cache.py |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/lib/bb/cache.py b/lib/bb/cache.py
index d72622d..e1800bb 100644
--- a/lib/bb/cache.py
+++ b/lib/bb/cache.py
@@ -331,13 +331,9 @@ class Cache(object):
 
         self.checked.add(fn)
 
-        # Pretend we're clean so getVar works
-        self.clean.add(fn)
-
         # File isn't in depends_cache
         if not fn in self.depends_cache:
             logger.debug(2, "Cache: %s is not cached", fn)
-            self.remove(fn)
             return False
 
         mtime = bb.parse.cached_mtime_noerror(fn)
@@ -393,6 +389,7 @@ class Cache(object):
                 self.clean.remove(fn)
             return False
 
+        self.clean.add(fn)
         return True
 
     def remove(self, fn):
-- 
1.7.2.3

_______________________________________________
Bitbake-dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/bitbake-dev

Reply via email to