summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-01-05 16:43:21 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-07 13:40:20 +0000
commitae1fc966f79822c18c4ddd8463640cc9d2ff7ff2 (patch)
tree4c9de8cf4106cf1b904487200b3cf7e8ba36223a
parent84f66b5d2218363f2f07e63bbdd6c1861b1a9916 (diff)
downloadpoky-ae1fc966f79822c18c4ddd8463640cc9d2ff7ff2.tar.gz
classes/buildhistory: actually use KiB in extensible SDK sizes files
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. (From OE-Core rev: e6b1840ee9aeb933f86fd2a92a90b94c1bc9db7c) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/buildhistory.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass
index 943c8d7d0c..4153e58792 100644
--- a/meta/classes/buildhistory.bbclass
+++ b/meta/classes/buildhistory.bbclass
@@ -531,13 +531,14 @@ END
531 531
532python buildhistory_get_extra_sdkinfo() { 532python buildhistory_get_extra_sdkinfo() {
533 import operator 533 import operator
534 import math
534 if d.getVar('BB_CURRENTTASK', True) == 'populate_sdk_ext': 535 if d.getVar('BB_CURRENTTASK', True) == 'populate_sdk_ext':
535 tasksizes = {} 536 tasksizes = {}
536 filesizes = {} 537 filesizes = {}
537 for root, _, files in os.walk('${SDK_OUTPUT}/${SDKPATH}/sstate-cache'): 538 for root, _, files in os.walk('${SDK_OUTPUT}/${SDKPATH}/sstate-cache'):
538 for fn in files: 539 for fn in files:
539 if fn.endswith('.tgz'): 540 if fn.endswith('.tgz'):
540 fsize = os.path.getsize(os.path.join(root, fn)) 541 fsize = int(math.ceil(float(os.path.getsize(os.path.join(root, fn))) / 1024))
541 task = fn.rsplit(':', 1)[1].split('_', 1)[1].split('.')[0] 542 task = fn.rsplit(':', 1)[1].split('_', 1)[1].split('.')[0]
542 origtotal = tasksizes.get(task, 0) 543 origtotal = tasksizes.get(task, 0)
543 tasksizes[task] = origtotal + fsize 544 tasksizes[task] = origtotal + fsize