diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2019-12-11 02:06:09 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-01-11 15:19:27 +0000 |
commit | 402b552239e836a1766a6f53fb02587e14963827 (patch) | |
tree | 202a6e8f3dd621a1cdb94e86079195ef9f6e21a1 /meta/classes | |
parent | b4087338be0955a8d82a835aecc5ad50dfa96f64 (diff) | |
download | poky-402b552239e836a1766a6f53fb02587e14963827.tar.gz |
toaster.bbclass: Correct pkgdatadir path in toaster_package_dumpdata()
In commit 692b2046 (package: Fix race between do_package and
do_packagedata), the path used for do_packagedata[sstate-inputdirs]
was changed from "${PKGDESTWORK}" to "${WORKDIR}/pkgdata-pdata-input".
This commit adapts the path used for pkgdatadir in
toaster_package_dumpdata() accordingly to avoid setscene errors like:
ERROR: libgcc-9.2.0-r0 do_packagedata_setscene: Error executing a
python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this
exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function:
<module>
0001:
*** 0002:toaster_package_dumpdata(d)
0003:
File: 'meta/classes/toaster.bbclass', lineno: 130, function:
toaster_package_dumpdata
0126: lpkgdata = {}
0127: datadir = os.path.join(pkgdatadir, 'runtime')
0128:
0129: # scan and send data for each generated package
*** 0130: for datafile in os.listdir(datadir):
0131: if not datafile.endswith('.packaged'):
0132: lpkgdata = _toaster_load_pkgdatafile(datadir,
0133: # Fire an event containing the pkg data
0134: bb.event.fire(bb.event.MetadataEvent(
Exception: FileNotFoundError: [Errno 2] No such file or directory:
'tmp/work/mips32r2el-nf-poky-linux/libgcc/9.2.0-r0/pkgdata/runtime'
(From OE-Core rev: 5a0f6f631b86f7107aa72453b6d23f32ba39f713)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/toaster.bbclass | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass index 6cef0b8f6e..6a65ecb957 100644 --- a/meta/classes/toaster.bbclass +++ b/meta/classes/toaster.bbclass | |||
@@ -113,7 +113,7 @@ def _toaster_load_pkgdatafile(dirpath, filepath): | |||
113 | pass # ignore lines without valid key: value pairs | 113 | pass # ignore lines without valid key: value pairs |
114 | return pkgdata | 114 | return pkgdata |
115 | 115 | ||
116 | python toaster_package_dumpdata() { | 116 | def _toaster_dumpdata(pkgdatadir, d): |
117 | """ | 117 | """ |
118 | Dumps the data about the packages created by a recipe | 118 | Dumps the data about the packages created by a recipe |
119 | """ | 119 | """ |
@@ -122,7 +122,6 @@ python toaster_package_dumpdata() { | |||
122 | if not d.getVar('PACKAGES'): | 122 | if not d.getVar('PACKAGES'): |
123 | return | 123 | return |
124 | 124 | ||
125 | pkgdatadir = d.getVar('PKGDESTWORK') | ||
126 | lpkgdata = {} | 125 | lpkgdata = {} |
127 | datadir = os.path.join(pkgdatadir, 'runtime') | 126 | datadir = os.path.join(pkgdatadir, 'runtime') |
128 | 127 | ||
@@ -132,6 +131,14 @@ python toaster_package_dumpdata() { | |||
132 | lpkgdata = _toaster_load_pkgdatafile(datadir, datafile) | 131 | lpkgdata = _toaster_load_pkgdatafile(datadir, datafile) |
133 | # Fire an event containing the pkg data | 132 | # Fire an event containing the pkg data |
134 | bb.event.fire(bb.event.MetadataEvent("SinglePackageInfo", lpkgdata), d) | 133 | bb.event.fire(bb.event.MetadataEvent("SinglePackageInfo", lpkgdata), d) |
134 | |||
135 | python toaster_package_dumpdata() { | ||
136 | _toaster_dumpdata(d.getVar('PKGDESTWORK'), d) | ||
137 | } | ||
138 | |||
139 | python toaster_packagedata_dumpdata() { | ||
140 | # This path needs to match do_packagedata[sstate-inputdirs] | ||
141 | _toaster_dumpdata(os.path.join(d.getVar('WORKDIR'), 'pkgdata-pdata-input'), d) | ||
135 | } | 142 | } |
136 | 143 | ||
137 | # 2. Dump output image files information | 144 | # 2. Dump output image files information |
@@ -366,8 +373,8 @@ toaster_buildhistory_dump[eventmask] = "bb.event.BuildCompleted" | |||
366 | addhandler toaster_artifacts | 373 | addhandler toaster_artifacts |
367 | toaster_artifacts[eventmask] = "bb.runqueue.runQueueTaskSkipped bb.runqueue.runQueueTaskCompleted" | 374 | toaster_artifacts[eventmask] = "bb.runqueue.runQueueTaskSkipped bb.runqueue.runQueueTaskCompleted" |
368 | 375 | ||
369 | do_packagedata_setscene[postfuncs] += "toaster_package_dumpdata " | 376 | do_packagedata_setscene[postfuncs] += "toaster_packagedata_dumpdata " |
370 | do_packagedata_setscene[vardepsexclude] += "toaster_package_dumpdata " | 377 | do_packagedata_setscene[vardepsexclude] += "toaster_packagedata_dumpdata " |
371 | 378 | ||
372 | do_package[postfuncs] += "toaster_package_dumpdata " | 379 | do_package[postfuncs] += "toaster_package_dumpdata " |
373 | do_package[vardepsexclude] += "toaster_package_dumpdata " | 380 | do_package[vardepsexclude] += "toaster_package_dumpdata " |