summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@kernel.crashing.org>2020-01-21 18:27:01 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-02-02 16:57:21 +0000
commit843e4935b93b83349535e9f1d451826a36aa3c8b (patch)
tree2cfbba178cb762a4a39d413abe11690bd91768e4
parentc634b8db1a8b98a32953838e3a254c4c4a863d28 (diff)
downloadpoky-843e4935b93b83349535e9f1d451826a36aa3c8b.tar.gz
toaster.bbclass: Fix error when toaster is used to monitor a build
The error being corrected looks like: File: '/home/jenkins/workspace/OEBuild/build-32/oe-core/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, datafile) 0133: # Fire an event containing the pkg data 0134: bb.event.fire(bb.event.MetadataEvent("SinglePackageInfo", lpkgdata), d) Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/jenkins/workspace/OEBuild/builds/build-32/tmp-glibc/work/core2-64-oe-linux/puzzles/2_0.0+gitAUTOINC+c6e0161dd4-r0/pkgdata/runtime' There must be a small window before the data is available, but while the monitoring is on-going. (From OE-Core rev: c7329b17cbbef64984196e2b79a81988db1d2bf3) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/toaster.bbclass11
1 files changed, 6 insertions, 5 deletions
diff --git a/meta/classes/toaster.bbclass b/meta/classes/toaster.bbclass
index 6a65ecb957..9518ddf7a4 100644
--- a/meta/classes/toaster.bbclass
+++ b/meta/classes/toaster.bbclass
@@ -126,11 +126,12 @@ def _toaster_dumpdata(pkgdatadir, d):
126 datadir = os.path.join(pkgdatadir, 'runtime') 126 datadir = os.path.join(pkgdatadir, 'runtime')
127 127
128 # scan and send data for each generated package 128 # scan and send data for each generated package
129 for datafile in os.listdir(datadir): 129 if os.path.exists(datadir):
130 if not datafile.endswith('.packaged'): 130 for datafile in os.listdir(datadir):
131 lpkgdata = _toaster_load_pkgdatafile(datadir, datafile) 131 if not datafile.endswith('.packaged'):
132 # Fire an event containing the pkg data 132 lpkgdata = _toaster_load_pkgdatafile(datadir, datafile)
133 bb.event.fire(bb.event.MetadataEvent("SinglePackageInfo", lpkgdata), d) 133 # Fire an event containing the pkg data
134 bb.event.fire(bb.event.MetadataEvent("SinglePackageInfo", lpkgdata), d)
134 135
135python toaster_package_dumpdata() { 136python toaster_package_dumpdata() {
136 _toaster_dumpdata(d.getVar('PKGDESTWORK'), d) 137 _toaster_dumpdata(d.getVar('PKGDESTWORK'), d)