pass    # ignore lines without valid key: value pairs
     return pkgdata
 
-python toaster_package_dumpdata_setscene() {
-    """
-    Dumps the data created by package_setscene
-    """
-    # replicate variables from the package.bbclass
-    packages = d.getVar('PACKAGES', True)
-    pkgdatadir = d.getVar('PKGDATA_DIR', True)
-    # scan and send data for each package
-    lpkgdata = {}
-    for pkg in packages.split():
-        try:
-          lpkgdata = _toaster_load_pkgdatafile(pkgdatadir + "/runtime/", pkg)
-        except:
-          # these are typically foo-locale which actually point into foo-locale-<language> in runtime-rprovides
-          bb.note("toaster_package_dumpdata_setscene: failed to load pkg information for: %s:%s"%(pkg,sys.exc_info()[0]))
-        # Fire an event containing the pkg data
-        bb.event.fire(bb.event.MetadataEvent("SinglePackageInfo", lpkgdata), d)
-
-}
-
-
 python toaster_package_dumpdata() {
     """
-    Dumps the data created by emit_pkgdata
+    Dumps the data about the packages created by a recipe
     """
-    # replicate variables from the package.bbclass
-
-    packages = d.getVar('PACKAGES', True)
-    pkgdatadir = d.getVar('PKGDESTWORK', True)
 
-    # scan and send data for each package
+    # No need to try and dumpdata if the recipe isn't generating packages
+    if not d.getVar('PACKAGES', True):
+        return
 
+    pkgdatadir = d.getVar('PKGDESTWORK', True)
     lpkgdata = {}
-    for pkg in packages.split():
-
-        lpkgdata = _toaster_load_pkgdatafile(pkgdatadir + "/runtime/", pkg)
-
-        # Fire an event containing the pkg data
-        bb.event.fire(bb.event.MetadataEvent("SinglePackageInfo", lpkgdata), d)
+    datadir = os.path.join(pkgdatadir, 'runtime')
+
+    # scan and send data for each generated package
+    for datafile in os.listdir(datadir):
+        if not datafile.endswith('.packaged'):
+            lpkgdata = _toaster_load_pkgdatafile(datadir, datafile)
+            # Fire an event containing the pkg data
+            bb.event.fire(bb.event.MetadataEvent("SinglePackageInfo", lpkgdata), d)
 }
 
 # 2. Dump output image files information
 addhandler toaster_buildhistory_dump
 toaster_buildhistory_dump[eventmask] = "bb.event.BuildCompleted"
 
-do_packagedata_setscene[postfuncs] += "toaster_package_dumpdata_setscene "
-do_packagedata_setscene[vardepsexclude] += "toaster_package_dumpdata_setscene "
+do_packagedata_setscene[postfuncs] += "toaster_package_dumpdata "
+do_packagedata_setscene[vardepsexclude] += "toaster_package_dumpdata "
 
 do_package[postfuncs] += "toaster_package_dumpdata "
 do_package[vardepsexclude] += "toaster_package_dumpdata "