diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2014-12-10 14:44:59 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-12-19 18:08:00 +0000 |
commit | 31e86e6b02bcd1f5abd376a4f9b5598464cbe994 (patch) | |
tree | c87217ed93910b4c1b865194d3464970cb361bac | |
parent | 1f41cb64b45472ba01fe6e57f58a71ac23801258 (diff) | |
download | ast2050-yocto-poky-31e86e6b02bcd1f5abd376a4f9b5598464cbe994.zip ast2050-yocto-poky-31e86e6b02bcd1f5abd376a4f9b5598464cbe994.tar.gz |
toaster.bbclass: trigger event for other image files
Toaster will log all the files that it can find in the
deploy images directory, and list them, considering that
they may be artifacts of the current build not logged
anywhere else.
[YOCTO #6836]
(From OE-Core rev: 87a25b1dec86da809c9a13c10449bd33a471cb95)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@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/toaster.bbclass | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass index a7dd0aa..55d0d28 100644 --- a/meta/classes/toaster.bbclass +++ b/meta/classes/toaster.bbclass @@ -149,14 +149,26 @@ python toaster_image_dumpdata() { image_name = d.getVar('IMAGE_NAME', True); image_info_data = {} + artifact_info_data = {} + # collect all artifacts for dirpath, dirnames, filenames in os.walk(deploy_dir_image): for fn in filenames: - if fn.startswith(image_name): - image_output = os.path.join(dirpath, fn) - image_info_data[image_output] = os.stat(image_output).st_size + try: + if fn.startswith(image_name): + image_output = os.path.join(dirpath, fn) + image_info_data[image_output] = os.stat(image_output).st_size + else: + import stat + artifact_path = os.path.join(dirpath, fn) + filestat = os.stat(artifact_path) + if stat.S_ISREG(filestat.st_mode): + artifact_info_data[artifact_path] = filestat.st_size + except OSError as e: + bb.event.fire(bb.event.MetadataEvent("OSErrorException", e), d) bb.event.fire(bb.event.MetadataEvent("ImageFileSize",image_info_data), d) + bb.event.fire(bb.event.MetadataEvent("ArtifactFileSize",artifact_info_data), d) } |