summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/toaster.bbclass25
1 files changed, 23 insertions, 2 deletions
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index a17501e03e..1c0703c680 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -112,6 +112,26 @@ def _toaster_load_pkgdatafile(dirpath, filepath):
112 pass # ignore lines without valid key: value pairs 112 pass # ignore lines without valid key: value pairs
113 return pkgdata 113 return pkgdata
114 114
115python toaster_package_dumpdata_setscene() {
116 """
117 Dumps the data created by package_setscene
118 """
119 # replicate variables from the package.bbclass
120 packages = d.getVar('PACKAGES', True)
121 pkgdatadir = d.getVar('PKGDATA_DIR', True)
122 # scan and send data for each package
123 lpkgdata = {}
124 for pkg in packages.split():
125 try:
126 lpkgdata = _toaster_load_pkgdatafile(pkgdatadir + "/runtime/", pkg)
127 except:
128 # these are typically foo-locale which actually point into foo-locale-<language> in runtime-rprovides
129 bb.note("toaster_package_dumpdata_setscene: failed to load pkg information for: %s:%s"%(pkg,sys.exc_info()[0]))
130 # Fire an event containing the pkg data
131 bb.event.fire(bb.event.MetadataEvent("SinglePackageInfo", lpkgdata), d)
132
133}
134
115 135
116python toaster_package_dumpdata() { 136python toaster_package_dumpdata() {
117 """ 137 """
@@ -120,8 +140,6 @@ python toaster_package_dumpdata() {
120 # replicate variables from the package.bbclass 140 # replicate variables from the package.bbclass
121 141
122 packages = d.getVar('PACKAGES', True) 142 packages = d.getVar('PACKAGES', True)
123 pkgdest = d.getVar('PKGDEST', True)
124
125 pkgdatadir = d.getVar('PKGDESTWORK', True) 143 pkgdatadir = d.getVar('PKGDESTWORK', True)
126 144
127 # scan and send data for each package 145 # scan and send data for each package
@@ -382,6 +400,9 @@ toaster_collect_task_stats[eventmask] = "bb.event.BuildCompleted bb.build.TaskSu
382addhandler toaster_buildhistory_dump 400addhandler toaster_buildhistory_dump
383toaster_buildhistory_dump[eventmask] = "bb.event.BuildCompleted" 401toaster_buildhistory_dump[eventmask] = "bb.event.BuildCompleted"
384 402
403do_packagedata_setscene[postfuncs] += "toaster_package_dumpdata_setscene "
404do_packagedata_setscene[vardepsexclude] += "toaster_package_dumpdata_setscene "
405
385do_package[postfuncs] += "toaster_package_dumpdata " 406do_package[postfuncs] += "toaster_package_dumpdata "
386do_package[vardepsexclude] += "toaster_package_dumpdata " 407do_package[vardepsexclude] += "toaster_package_dumpdata "
387 408