[gnome-continuous-yocto/gnomeostree-3.28-rocko: 441/8267] bitbake: cooker: Fix parse progress for python3



commit 2192a48a5dc2f2e9c16d6b03ddd578333763c355
Author: Richard Purdie <richard purdie linuxfoundation org>
Date:   Fri May 20 12:48:02 2016 +0100

    bitbake: cooker: Fix parse progress for python3
    
    Under python the type conversions can mean there are float values
    used for triggering the parse progress events which then fails.
    Add an explict int() conversion to ensure the parse events are
    generated under python3.
    
    (Bitbake rev: 138329c58e92744c56aae3ab70ceeef09613250c)
    
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 bitbake/lib/bb/cooker.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 44aa11e..fb86446 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -2020,7 +2020,7 @@ class CookerParser(object):
             else:
                 self.fromcache.append((filename, appends))
         self.toparse = self.total - len(self.fromcache)
-        self.progress_chunk = max(self.toparse / 100, 1)
+        self.progress_chunk = int(max(self.toparse / 100, 1))
 
         self.num_processes = min(int(self.cfgdata.getVar("BB_NUMBER_PARSE_THREADS", True) or
                                  multiprocessing.cpu_count()), len(self.willparse))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]