summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-02-02 10:25:02 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-04 23:39:01 +0000
commiteee675bd7190d0953dfb760d8a1cacd192e3ddac (patch)
treed341da67cb3ab422ca14ebdbee9a0a1039d6f923 /meta/classes
parent0c0b07286f28f33d2334681b3a4d378d14f90d76 (diff)
downloadpoky-eee675bd7190d0953dfb760d8a1cacd192e3ddac.tar.gz
toaster.bbclass: attach image file scan postfunc to do_image_complete
The postfunc for finding image files after completion of a build fails, as the image files we're interested in don't exist at the point when the scan is currently done (following do_rootfs). Attach the postfunc for scanning for image files to the new do_image_complete task, which definitely runs after the image files have been created. [YOCTO #8956] (From OE-Core rev: 9c597ef05cec12178d886f83a4cf7070f032ab2f) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/toaster.bbclass14
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index fba9067f0a..e307014a6a 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -159,7 +159,7 @@ python toaster_image_dumpdata() {
159 except OSError as e: 159 except OSError as e:
160 bb.event.fire(bb.event.MetadataEvent("OSErrorException", e), d) 160 bb.event.fire(bb.event.MetadataEvent("OSErrorException", e), d)
161 161
162 bb.event.fire(bb.event.MetadataEvent("ImageFileSize",image_info_data), d) 162 bb.event.fire(bb.event.MetadataEvent("ImageFileSize", image_info_data), d)
163} 163}
164 164
165python toaster_artifact_dumpdata() { 165python toaster_artifact_dumpdata() {
@@ -175,14 +175,12 @@ python toaster_artifact_dumpdata() {
175 for fn in filenames: 175 for fn in filenames:
176 try: 176 try:
177 artifact_path = os.path.join(dirpath, fn) 177 artifact_path = os.path.join(dirpath, fn)
178 filestat = os.stat(artifact_path)
179 if not os.path.islink(artifact_path): 178 if not os.path.islink(artifact_path):
180 artifact_info_data[artifact_path] = filestat.st_size 179 artifact_info_data[artifact_path] = os.stat(artifact_path).st_size
181 except OSError as e: 180 except OSError as e:
182 import sys
183 bb.event.fire(bb.event.MetadataEvent("OSErrorException", e), d) 181 bb.event.fire(bb.event.MetadataEvent("OSErrorException", e), d)
184 182
185 bb.event.fire(bb.event.MetadataEvent("ArtifactFileSize",artifact_info_data), d) 183 bb.event.fire(bb.event.MetadataEvent("ArtifactFileSize", artifact_info_data), d)
186} 184}
187 185
188# collect list of buildstats files based on fired events; when the build completes, collect all stats and fire an event with collected data 186# collect list of buildstats files based on fired events; when the build completes, collect all stats and fire an event with collected data
@@ -357,9 +355,11 @@ toaster_buildhistory_dump[eventmask] = "bb.event.BuildCompleted"
357do_package[postfuncs] += "toaster_package_dumpdata " 355do_package[postfuncs] += "toaster_package_dumpdata "
358do_package[vardepsexclude] += "toaster_package_dumpdata " 356do_package[vardepsexclude] += "toaster_package_dumpdata "
359 357
360do_rootfs[postfuncs] += "toaster_image_dumpdata " 358do_image_complete[postfuncs] += "toaster_image_dumpdata "
359do_image_complete[vardepsexclude] += "toaster_image_dumpdata "
360
361do_rootfs[postfuncs] += "toaster_licensemanifest_dump " 361do_rootfs[postfuncs] += "toaster_licensemanifest_dump "
362do_rootfs[vardepsexclude] += "toaster_image_dumpdata toaster_licensemanifest_dump " 362do_rootfs[vardepsexclude] += "toaster_licensemanifest_dump "
363 363
364do_populate_sdk[postfuncs] += "toaster_artifact_dumpdata " 364do_populate_sdk[postfuncs] += "toaster_artifact_dumpdata "
365do_populate_sdk[vardepsexclude] += "toaster_artifact_dumpdata " 365do_populate_sdk[vardepsexclude] += "toaster_artifact_dumpdata "