]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
cooker: Fix parse progress for python3
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 20 May 2016 11:48:02 +0000 (12:48 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 21 May 2016 11:14:31 +0000 (12:14 +0100)
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/cooker.py

index 44aa11e5310a938a5590e09e89db49480a9c629f..fb86446d4787a352c24f6a7c96016ec1796c3f43 100644 (file)
@@ -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))