]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker: save progress chunk value (total/100)
authorChris Larson <chris_larson@mentor.com>
Fri, 19 Nov 2010 19:00:37 +0000 (12:00 -0700)
committerChris Larson <chris_larson@mentor.com>
Sun, 21 Nov 2010 18:24:47 +0000 (11:24 -0700)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/bb/cooker.py

index bfbcbb5f03b5ab52a0c5cf5353cbb79d55fd0948..3ae45f1494262054a06f7a224d1bdf91ab2fe00c 100644 (file)
@@ -962,6 +962,7 @@ class CookerParser(object):
         self.current = 0
         self.result_queue = None
         self.fromcache = None
+        self.progress_chunk = self.total / 100
 
         self.launch_processes()
 
@@ -1056,7 +1057,7 @@ class CookerParser(object):
                     self.skipped += 1
         finally:
             # only fire events on percentage boundaries
-            if self.current % (self.total/100) == 0:
+            if self.current % self.progress_chunk == 0:
                 bb.event.fire(bb.event.ParseProgress(self.current), self.cfgdata)
 
         self.current += 1