mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
lib/oe/sdk: Adds get_extra_sdk_info to reuse code in buildhistory
This function is going to be used for generating the target and host manifest files packages for eSDK. Added some fixes for buildhistory.bblclass, and docstring for get_extra_sdkinfo at oe.sdk [YOCTO #9038] (From OE-Core rev: f696b3bbe01969ce7ecb8174d63d3e1e172b473e) Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
246b73ad55
commit
08a4705af9
@@ -372,5 +372,24 @@ def populate_sdk(d, manifest_dir=None):
|
||||
os.environ.clear()
|
||||
os.environ.update(env_bkp)
|
||||
|
||||
def get_extra_sdkinfo(sstate_dir):
|
||||
"""
|
||||
This function is going to be used for generating the target and host manifest files packages of eSDK.
|
||||
"""
|
||||
import math
|
||||
|
||||
extra_info = {}
|
||||
extra_info['tasksizes'] = {}
|
||||
extra_info['filesizes'] = {}
|
||||
for root, _, files in os.walk(sstate_dir):
|
||||
for fn in files:
|
||||
if fn.endswith('.tgz'):
|
||||
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 = extra_info['tasksizes'].get(task, 0)
|
||||
extra_info['tasksizes'][task] = origtotal + fsize
|
||||
extra_info['filesizes'][fn] = fsize
|
||||
return extra_info
|
||||
|
||||
if __name__ == "__main__":
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user