summaryrefslogtreecommitdiffstats
path: root/meta/classes/toaster.bbclass
AgeCommit message (Collapse)Author
2017-06-12toaster.bbclass: Ignore some dependencies in toaster_buildhistory_dump()Peter Kjellerstedt
When using RPM, depends.dot may contain dependencies such as "/bin/sh", which will confuse _toaster_load_pkgdatafile(). Ignore them. While at it, also ignore dependencies that contain parentheses, e.g., "libc.so.6(GLIBC_2.7)". Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12toaster.bbclass: Simplify parsing of depends.dotPeter Kjellerstedt
By using a single regular expression, the parsing of the depends.dot file can be simplified a lot. This should also make it less susceptible to formatting changes in that file. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11toaster: fix SDK artifact captureDavid Reyna
Use the TaskArtifacts event to scan the SDK and ESDK manifests to cleanly collect the respective artifact files. The previous method was broken when the SDK file deployment moved from the do_populate_sdk[_ext] tasks to their sstate tasks. That method is disabled (but not yet removed) in preparation for the rest of refactor work for the parent #10283 work. [YOCTO #10850] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-17toaster.bbclass: Correct parsing of installed-package-sizes.txtPeter Kjellerstedt
The recent change in buildhistory.bbclass to use a tab in installed-package-sizes.txt between "KiB" and the package name caused toaster_buildhistory_dump() to fail since it parses the file and expected a space there. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-09toaster: prevent use of unset variable BUILDSTATS_BASEJochen Jaegers
Signed-off-by: Jochen Jaegers <jochen.jaegers@riedel-at.de> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-12-16meta: remove True option to getVar callsJoshua Lock
getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-04toaster: fire TaskArtifacts eventEd Bartosh
Fire TaskArtifact MetaData event for deployment tasks when task either completed or skipped. Event contains full task id (recipe+task) and list of deployment artifacts from sstate manifest. This should allow Toaster to always get notified about deployment artifacts produced by the build. [YOCTO #9869] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-19toaster.bbclass: only scan files-in-image.txt if it existsElliot Smith
We can reach the method in toaster.bbclass which tries to read from the files-in-image.txt file via a build which doesn't create that file (e.g. "bitbake core-image-minimal -c rootfs"). This causes the build to fail with an exception. Check that this file exists before trying to read from it. [YOCTO #9784] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-19toaster.bbclass: remove directory scan logic for detecting artifactsElliot Smith
toaster.bbclass does a scan of the image deploy and SDK directories when a build finishes. However, this brings no benefit and could be better managed and made easier to modify if moved to toasterui and carried out when the BuildCompleted event occurs. Remove the image scan code from toaster.bbclass, prior to moving it to toasterui and buildinfohelper. Also remove the license manifest update code, as this can also be done from toasterui. The postfuncs for do_populate_sdk are retained, but no longer do the directory scan for SDK artifacts. Instead, they fire an event with the value of the TOOLCHAIN_OUTPUTNAME variable, as this is only accessible at the point when the do_populate_sdk and do_populate_sdk_ext tasks are run. The value of this can then be used by buildinfohelper to find the SDK artifacts produced by a target. [YOCTO #9002] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Update to use python3 command pipeline decodingRichard Purdie
In python3, strings are unicode by default. We need to encode/decode from command pipelines and other places where we interface with the real world using the correct locales. This patch updates various call sites to use the correct encoding/decodings. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-13toaster.bbclass: improve package information collectionJoshua Lock
The PACKAGES variable doesn't include all packages potentially generated by a recipe, not least of all because it doesn't include dynamic packages created via do_split_packages() or similar. Instead of trying to guess which packages were generated, walk ${PKGDESTWORK}/runtime to find all package information that was written to disk. This allows us to read all information for the complete list of packages generated by the recipe. For example before this patch we get SinglePackageInfo events for 9 packages from ncurses. With the patch applied we get 20 events for all of the packages created during an ncurses build. As a bonus we also switch to using the same postfuncs for both do_packagedata and do_packagedata_setscene as they each result in a PKGDESTWORK with the relevant directories and files created. [YOCTO #9115] Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-08toaster.bbclass: strip task from the targetEd Bartosh
Current code in toaster_buildhistory_dump assumes that bitbake target doesn't contain task name. It uses target as a part of path to the files with data that it analizes. It fails to find files if target contains task name. Stripping task from the target should solve this. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-11toaster.bbclass: show packages that were setscened into existence toobrian avery
We were previously ignoring pkgs that came in from a setscene like from an sstate mirror). With this patch we can use pkgs than come from sstate for image customisation as well. Also remove unused variable. [YOCTO #9137] Signed-off-by: brian avery <brian.avery@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-09toaster.bbclass: improve how we gather buildstats for ToasterElliot Smith
Clean up the code which gathers buildstats for Toaster, and modify the field names so that the correct parts of the buildstats files are used to derive the CPU usage values. Also derive elapsed time for the build here, rather than in Toaster, as we have ready access to the data in the correct format. [YOCTO #8842] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04toaster.bbclass: reinstate scan for artifacts in the sdk directoryElliot Smith
During refactoring of the SDK/artifact scan code in toaster.bbclass, the code to find other non-image artifacts in the images/ directory was incorrectly removed. Reinstate that code and clean it up so it's clearer what's happening and so that non-image artifacts are correctly reported. [YOCTO #8956] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04toaster.bbclass: attach image file scan postfunc to do_image_completeElliot Smith
The postfunc for finding image files after completion of a build fails, as the image files we're interested in don't exist at the point when the scan is currently done (following do_rootfs). Attach the postfunc for scanning for image files to the new do_image_complete task, which definitely runs after the image files have been created. [YOCTO #8956] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-17toaster.bbclass: Separate artifact dump from image file dumpElliot Smith
SDK artifacts were being dumped alongside the image file dump. However, the dump was not being triggered correctly, as it should be attached as a postfunc to do_populate_sdk, rather than do_rootfs, as do_rootfs doesn't always fire when populating the SDK directory. By adding a postfunc to do_populate_sdk, the postfunc is fired in the correct situations. Also fixes the directory which is scanned for SDK artifacts, as this is different from the image file directory. [YOCTO #7603] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-22toaster.bbclass: fix TypeError when parsing build statsElliot Smith
Reading IO stats fails because the IO read/write bytes are being converted to strings, then added to a numeric running total. Fix this by converting IO stats to integers. Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18buildstats-summary/toaster: Cope with removal of get_bn()Richard Purdie
The buildstats changes removed the no longer needed get_bn() function, replace this with references to BUILDNAME. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18toaster: Update for buildstats changesRichard Purdie
This updates the toaster class to use the new data format from buildstats. This does mean it will no longer read IO data from older builds, however since that data is completely useless anyway, I don't consider that to be an issue. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-27toaster.bbclass: Fix ValueErrorEd Bartosh
Running "bitbake xxx:do_unpack" resulted in exception at the BuildCompleted event from toaster. The reason for this exception was usage of ':' as a field delimiter in toasterstatlist file. As target can optionally contain ':<task>' suffix it caused split(':') to throw exception: File "toaster_collect_task_stats(e)", line 71, in toaster_collect_task_stats(e=<bb.event.BuildCompleted object at 0x7f8434deed50>) ValueError: too many values to unpack Fixed by changing delimiter ':' -> '::' Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-29toaster.bbclass: do not add symbolic links to artifactsAlexandru DAMIAN
This patch removes the symbolic links from the artifact list. [YOCTO #7184] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-19toaster.bbclass: trigger event for other image filesAlexandru DAMIAN
Toaster will log all the files that it can find in the deploy images directory, and list them, considering that they may be artifacts of the current build not logged anywhere else. [YOCTO #6836] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2014-11-28toaster.bbclass: use the openembedded-core nameAlexandru DAMIAN
Fixing the bug where the openembedded-core name was registered as "meta" in toaster. [YOCTO #6962] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-06toaster.bbclass: read elapsed time from the stats fileAlexandru DAMIAN
We read the elapsed time fromt the build stats file, instead of computing it independently. [YOCTO #6833] [YOCTO #6685] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-03toaster.bbclass: exclude variable dependency on toaster postfuncAlexandru DAMIAN
This patch fixes an issue where the toaster postfuncs were added to the task signature, making impossible the reuse of sstate caches from builds outside toaster control. Now the signatures do not differ between toaster and toaster-less builds. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-19toaster.bbclass: do not fail on non-existent filesAlexandru DAMIAN
Toaster may look up inexistent file paths in the build history for packages that have been referenced but not built. This triggers a failure, and this patch recovers by deleting the reference to the non-built packages. [YOCTO #6063] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-11toaster.bbclass: read list of files in imageAlexandru DAMIAN
We read the list of files in a built image and send it over with the same event for packages in image. (From OE-Core rev: 21bb659beca69c8bb379af2bf10afc843f529e57) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-08toaster.bbclass: image file is missing a "/"Cristiana Voicu
Relaced the key with the join between path and file name. [YOCTO #6090] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-31toaster.bbclass: the license.manifest is located in DEPLOY_DIRCristiana Voicu
Replaced DEPLOY_DIR_IMAGE with DEPLOY_DIR [YOCTO #6051] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-25toaster.bbclass: update buildstats event dataAlexandru DAMIAN
We add the PN to the buildstats event data in order to proper select database task when multiple similar tasks are executed for the same recipe file. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-03-21toaster.bbclass: read the data needed for license manifest pathCristiana Voicu
The license.manifest file is located in DEPLOY_DIR_IMAGE/licenses/ IMAGE_NAME dir. The data needed is collected after rootfs task. [YOCTO #5649] Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-29toaster.bbclass: save original package nameAlexandru DAMIAN
If we can get the original package name when reading package infos in toaster.bbclass, we save it for proper referincing in the toater ui. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-21toaster.bbclass: fix crash on buildstats collectionAlexandru DAMIAN
Toaster needs buildstats to be enabled in order to collect task statistics. The toaster.bbclass didn't have a guard to stop task data collection if the buildstats weren't enabled, leading to a crash. This patch verifies that the task variables are defined before trying to use them. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-10toaster.bbclass: read package and image informationAlexandru DAMIAN
In the process of removing the local system accesses from toaster UI (which must be able to run remotely), the code to read package information is moved from Bitbake Toaster UI to the server-side toaster.bbclass [YOCTO #5604] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2013-12-10toaster.bbclass: read build statsAlexandru DAMIAN
In the process of removing the local system accesses from toaster UI (which must be able to run remotely), the code to read build stats is moved from Bitbake Toaster UI to the server-side toaster.bbclass The code will accumulate a list of stat files to be read at build completion. When the build completes, the whole data list is read and sent through in a single event. [YOCTO #5604] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2013-12-10toaster.bbclass: read layer informationAlexandru DAMIAN
In the process of removing the local system accesses from toaster UI (which must be able to run remotely), the code to read layer information is moved from Bitbake Toaster UI to the server-side toaster.bbclass [YOCTO #5604] Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
2013-12-03classes/package: fix FILES_INFO serialisation in pkgdataPaul Eggleton
The FILES_INFO entry in each pkgdata file stores the list of files for each package. Make the following improvements to how this is stored: * Store paths as they would be seen on the target rather than erroneously including the full path to PKGDEST (which is specific to the build host the package was built on) * For simplicity when loading the data, store complete paths for each entry instead of trying to break off the first part and use it as the dict key * Record sizes for each file (as needed by Toaster) * Serialise the value explicitly using json rather than just passing it through str(). Fixes [YOCTO #5443]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-11-04toaster: add class to dump toaster-tracked dataAlexandru DAMIAN
Adding a new bbclass that will collect and send relevant data from the task context to the Toaster UI. This bbclass consists of postfuncs that get executed right after the main task func, and in the same context. This allows data gathering in a synchronous manner during the build, guaranteeing data integrity. This approach also preserves the task signatures. The data is moved to the UI through the event system. There is no performance impact if the class is disabled. License is MIT. Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>