]> code.ossystems Code Review - openembedded-core.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)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 4 Jan 2011 14:46:43 +0000 (14:46 +0000)
(Bitbake rev: 09333737cbeeb9875d938521ddcd519fc808bcc3)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/cooker.py

index b573c32ed9bf7d7ff734d89ecb5258870a4e3db5..8a3caeb4cc4cf78d62bc9d500056e63ddcf9c462 100644 (file)
@@ -997,6 +997,7 @@ class CookerParser(object):
         self.current = 0
         self.result_queue = None
         self.fromcache = None
+        self.progress_chunk = self.total / 100
 
         self.launch_processes()
 
@@ -1092,7 +1093,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