I was using bytes here for the sizes and writing out KiB as the suffix.
Change it to actually write out size values in KiB.

Signed-off-by: Paul Eggleton <[email protected]>
---
 meta/classes/buildhistory.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/buildhistory.bbclass 
b/meta/classes/buildhistory.bbclass
index 943c8d7..4153e58 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -531,13 +531,14 @@ END
 
 python buildhistory_get_extra_sdkinfo() {
     import operator
+    import math
     if d.getVar('BB_CURRENTTASK', True) == 'populate_sdk_ext':
         tasksizes = {}
         filesizes = {}
         for root, _, files in os.walk('${SDK_OUTPUT}/${SDKPATH}/sstate-cache'):
             for fn in files:
                 if fn.endswith('.tgz'):
-                    fsize = os.path.getsize(os.path.join(root, fn))
+                    fsize = 
int(math.ceil(float(os.path.getsize(os.path.join(root, fn))) / 1024))
                     task = fn.rsplit(':', 1)[1].split('_', 1)[1].split('.')[0]
                     origtotal = tasksizes.get(task, 0)
                     tasksizes[task] = origtotal + fsize
-- 
2.5.0

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to