deploy_dir_image = d.getVar('DEPLOY_DIR_IMAGE', True);
     image_name = d.getVar('IMAGE_NAME', True);
-
     image_info_data = {}
-    artifact_info_data = {}
 
-    # collect all artifacts
+    # collect all images
     for dirpath, dirnames, filenames in os.walk(deploy_dir_image):
         for fn in filenames:
             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 not os.path.islink(artifact_path):
-                        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)
 }
 
+python toaster_artifact_dumpdata() {
+    """
+    Dump data about artifacts in the SDK_DEPLOY directory
+    """
+
+    artifact_dir = d.getVar("SDK_DEPLOY", True)
+    artifact_info_data = {}
+
+    # collect all artifacts
+    for dirpath, dirnames, filenames in os.walk(artifact_dir):
+        for fn in filenames:
+            try:
+                artifact_path = os.path.join(dirpath, fn)
+                filestat = os.stat(artifact_path)
+                if not os.path.islink(artifact_path):
+                    artifact_info_data[artifact_path] = filestat.st_size
+            except OSError as e:
+                import sys
+                bb.event.fire(bb.event.MetadataEvent("OSErrorException", e), d)
 
+    bb.event.fire(bb.event.MetadataEvent("ArtifactFileSize",artifact_info_data), d)
+}
 
 # collect list of buildstats files based on fired events; when the build completes, collect all stats and fire an event with collected data
 
 
 addhandler toaster_buildhistory_dump
 toaster_buildhistory_dump[eventmask] = "bb.event.BuildCompleted"
+
 do_package[postfuncs] += "toaster_package_dumpdata "
 do_package[vardepsexclude] += "toaster_package_dumpdata "
 
 do_rootfs[postfuncs] += "toaster_image_dumpdata "
 do_rootfs[postfuncs] += "toaster_licensemanifest_dump "
-do_rootfs[vardepsexclude] += "toaster_image_dumpdata toaster_licensemanifest_dump"
+do_rootfs[vardepsexclude] += "toaster_image_dumpdata toaster_licensemanifest_dump "
+
+do_populate_sdk[postfuncs] += "toaster_artifact_dumpdata "
+do_populate_sdk[vardepsexclude] += "toaster_artifact_dumpdata "