mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
84f66b5d22
commit
ae1fc966f7
@@ -531,13 +531,14 @@ END
|
|||||||
|
|
||||||
python buildhistory_get_extra_sdkinfo() {
|
python buildhistory_get_extra_sdkinfo() {
|
||||||
import operator
|
import operator
|
||||||
|
import math
|
||||||
if d.getVar('BB_CURRENTTASK', True) == 'populate_sdk_ext':
|
if d.getVar('BB_CURRENTTASK', True) == 'populate_sdk_ext':
|
||||||
tasksizes = {}
|
tasksizes = {}
|
||||||
filesizes = {}
|
filesizes = {}
|
||||||
for root, _, files in os.walk('${SDK_OUTPUT}/${SDKPATH}/sstate-cache'):
|
for root, _, files in os.walk('${SDK_OUTPUT}/${SDKPATH}/sstate-cache'):
|
||||||
for fn in files:
|
for fn in files:
|
||||||
if fn.endswith('.tgz'):
|
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]
|
task = fn.rsplit(':', 1)[1].split('_', 1)[1].split('.')[0]
|
||||||
origtotal = tasksizes.get(task, 0)
|
origtotal = tasksizes.get(task, 0)
|
||||||
tasksizes[task] = origtotal + fsize
|
tasksizes[task] = origtotal + fsize
|
||||||
|
|||||||
Reference in New Issue
Block a user