summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/ui
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: providers: Add PREFERRED_RPROVIDER supportRichard Purdie2016-04-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes you can end up in a situation where you need to specify that a specific runtime entity should be provided by a specific entry. An example of this is bluez where you could end up in a situation where for example: NOTE: multiple providers are available for runtime libasound-module-bluez (bluez4, bluez5) NOTE: consider defining a PREFERRED_PROVIDER entry to match libasound-module-bluez NOTE: multiple providers are available for runtime bluez-hcidump (bluez-hcidump, bluez5) NOTE: consider defining a PREFERRED_PROVIDER entry to match bluez-hcidump The only option here is to set something like PREFERRED_PROVIDER_bluez4 = "bluez4" which is clearly not very informative. I've actually held off adding RPROVIDER support for a long while as this does have sigificant potential for misuse. It doesn't for example allow multiple runtime providers of the same name to coexist, that simply isn't supported. It therefore doesn't replace some of the name mappings such as busybox verses coreutils that OE-Core faces as that is a different problem with different constraints. This mechanism is simply to provide bitbake with a hint to decide what the dependency tree should look like. Also, this allows us to stop printing a confusing message telling the user to set PREFERRED_PROVIDER when the setting needed would be rather ambiguous. [YOCTO #5044] (Bitbake rev: 62eb39d1474d024b204634689071700605c6095c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker/knotty: Prefix parse logs with filename being parsedRichard Purdie2016-04-151-1/+2
| | | | | | | | | | | | | We now prefix log messages coming from worker task context with the PF and task info, however parsing messages all have to be manually prefixed which is ugly and error prone. This change modifies the log handler filter so this happens automatically, meaning we don't have to change every message to include that information. This makes error messages longer but more usable. (Bitbake rev: 1af0ccaac81e182c4ca520037dda362d180e5605) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: work around unicode exceptionsJoshua Lock2016-04-061-4/+6
| | | | | | | | | | | | | | | | | | | We have been seeing UnicodeDecodeErrors when handling the ImagePkgList MetadataEvent in ORMWrapper's save_target_file_information() if the event includes filenames that include non-ASCII characters. In the short term work around this by converting paths to the unicode type when passing them to Django's ORM. This is a bit of a hack but it's too late in the cycle to do anything more invasive. [YOCTO #9142] (Bitbake rev: f50fff03b3de02e73a3cc2eb9935f7c345dbddc4) 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>
* bitbake: toasterui: update build in internal stateEd Bartosh2016-04-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | buildinfohelper stores current Build object in its internal state. Any changes to Build object will be lost if internal state is not updated as current buildinfohelper code saves Build object from internal state when build is completed. This bug causes incorrect build state when build is cancelled. Updating internal state should fix it. Note, that this commit updates internal state after status of the build is changed to Build.CANCELLED. There are several other places in the code where Build object is updated without updating internal state. They should be carefully analyzed and fixed. (Bitbake rev: d056cf40fc55530cb1736aedfb9a3c355884991e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: fix KeyErrorEd Bartosh2016-04-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | When bitbake doesn't need to build anything it still sends ImagePkgList event with empty 'pkgdata', 'imgdata' and 'filedata' fields. This causes crash in buildinfohelper code as it's assumed that above mentioned fields always have data keyed by build target: ERROR: u'core-image-minimal' Traceback (most recent call last): File "toasterui.py", line 423, in main buildinfohelper.store_target_package_data(event) File "buildinfohelper.py", line 1218, in store_target_package_data imgdata = BuildInfoHelper._get_data_from_event(event)['imgdata'][target.target] KeyError: u'core-image-minimal' Fixed this by using dict.get method with empty dictionary as default return value instead of trying to get value without checking if target key is in the data. (Bitbake rev: c39cc463e6d9594bf2c5ac8bb74e834f6f2cf7c8) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: Add handler for cancelling a buildMichael Wood2016-04-061-1/+18
| | | | | | | | | | | When a build is cancelled the build (action) is complete if it has been caused the request being cancelled then update the build outcome accordingly. (Bitbake rev: d94d12914d351bf560b06d6f4e45c294b04ecaa3) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: shutdown on BuildCompleted eventEd Bartosh2016-04-061-5/+8
| | | | | | | | | | | | | | | | | | | | | toasterui exits event loop on one of the following events: CommandCompleted, CommandFailed or CommandExit. Unfortunately none of them come from bitbake when build fails. This is normai if toasterui runs in observer mode. However, if it's in build mode this causes toasterui to stuck in the infinite loop waiting for new events. The only event we can rely on is BuildCompleted as it always comes from bitbake unlike 3 above mentioned events. Modified the code to always shutdown toasterui in build mode on BuildCompleted event. (Bitbake rev: 9cd60f98b13cf7b1c518851a51e1cbaa596d8f81) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix jethro buildEd Bartosh2016-04-061-8/+10
| | | | | | | | | | | | | | | The keys 'started', 'ended', 'cpu_time_user', 'disk_io_read' and 'disk_io_write' were added to the event recently, so they don't exist in the events generated by bitbake server from older releases. Checking if task_to_update structure has these keys before using them should fix build of older releases. (Bitbake rev: 79611d0ea742263074fbb0bf5f1e39df75fd9f55) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: fix brbe reportingEd Bartosh2016-04-061-3/+3
| | | | | | | | | | | | | | | | | buildinfohelper.brbe is lost when buildinfohelper is closed. This causes incorrect report of brbe when build is done. Saved brbe attribute before closing buildinfohelper and used it to report correct brbe. Got rid of useless and confusing 'ToasterUI build done 1' log message. (Bitbake rev: 5d7cce0d0ed70f6b3ebd6cbad300d86964a13398) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: improve handling of providermapEd Bartosh2016-04-061-2/+1
| | | | | | | | | | | | | DepTreeGenerated event doesn't contain 'providermap' data in jethro. Modified buildinfohelper to handle events without this data. This should make it possible to handle jethro events coming from jethro bitbake server by the latest buildinfohelper. (Bitbake rev: f6dcb1c9967f042beae024146781cb8235a9e1f2) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: uievent: improve BBUIEventQueue codeEd Bartosh2016-04-061-2/+8
| | | | | | | | | | | | | Return value of self.BBServer.registerEventHandler differs between jethro and master. To be able to build jethro toaster should be able to communicate with jethro bitbake server i.e. it must work with both old and new registerEventHandler call. (Bitbake rev: f356c154016c428a3b53af61a075de6f14d9d1d9) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: add brbe parameter to buildinfohelperEd Bartosh2016-04-062-3/+4
| | | | | | | | | | | | | | | | | | | In current toaster code BRBE(build request:build environment) value is passed from toaster to buildinfohelper through the 'SetBRBE' event. Passing it through environment variable is easier as it doesn't involve rpc communication between toaster and bitbake server. It also eliminates the need in running bitbake observer process. Added parameter 'brbe' to BuildInfoHelper.__init__ Used environment variable TOASTER_BRBE to set brbe for buildinfohelper object. (Bitbake rev: a0c8e2b309055e5927a8ff729d292ccaa69d0575) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: buildinfohelper Add additional metadata to the built layerMichael Wood2016-04-031-11/+23
| | | | | | | | | | | | | | | | | Add additional metadata to the layer created for build history to be able to identify the layer and recipe later on. Specifically this is the branch and release to which the recipe and layer are associated with enabling differentiation of two recipes which are local release and master and 'master' release. [YOCTO #8528] [YOCTO #8545] (Bitbake rev: 3deebd887bddbbd02fd9829a180aab494b1af7c4) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: remove ParseStarted from the event listEd Bartosh2016-03-231-1/+0
| | | | | | | | | | | | | | bb.event.ParseStarted event is not processed by toasterui, but present in event list. This causes the following error: WARNING: Unknown event: <bb.event.ParseStarted object at ... and non-zero return code: WARNING: Return value is 1 (Bitbake rev: 1cc102f3d83d9467a3a3c422254333796ba95605) 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>
* bitbake: toasterui: Remove the excessive exception loggingMichael Wood2016-03-231-7/+0
| | | | | | | | | | | | Remove the very verbose log dump from toasterui. This generates several megabytes of not that useful debug information and actually hinders finding the original exception. (Bitbake rev: a21dc134bdce2c9eb5e47c770094660f0c45c398) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: orm Add a constant for the CustomImageRecipe's layer nameMichael Wood2016-03-231-2/+2
| | | | | | | | | | | Use a constant to define the name for the toaster custom images layer; this constant is then used to identify this layer in various places. (Bitbake rev: 2540969ec71612af7f9041cadcc401513e9b357b) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: rework task buildstats storage and displayElliot Smith2016-03-091-39/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The data available from buildstats is now more fine grained than previously, so take advantage of that to enrich the data we save against tasks: * Store the CPU usage for user and system separately, and display them separately. * Disk IO is now measured in bytes, not ms. Also store the read/write bytes separately. * Store started and ended times, as well as elapsed_time. This will enable future features such as showing which tasks were running at a particular point in the build. There was also a problem with how we were looking up the Task object, which meant that the buildstats were being added to new tasks which weren't correctly associated with the build. Fix how we look up the Task (only looking for tasks which match the build, and the task and recipe names in the build stats data) so the build stats are associated with the correct task. [YOCTO #8842] (Bitbake rev: efa6f915566b979bdbad233ae195b413cef1b8da) 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>
* bitbake: toasterui: fix warning 'Unknown event'Ed Bartosh2016-03-071-0/+1
| | | | | | | | | | | Continue after processing BuildStarted event to fix WARNING: Unknown event: <bb.event.BuildStarted object at 0x2554150> (Bitbake rev: 12f1fb8c9b70fea0c9145f881bcceb8af32df6af) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: exit on final eventsEd Bartosh2016-03-071-1/+4
| | | | | | | | | | | | | | | Toasterui exits only if bitbake observer shuts down. In build mode it should exit when build is done. Made toasterui exit on bb.command.CommandCompleted, bb.command.CommandFailed and bb.command.CommandExit events when it's running in build mode. (Bitbake rev: b11f9d6d3c2eb615335901e1dcea699daf3afb4c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: make toasterui to work in build modeEd Bartosh2016-03-071-2/+17
| | | | | | | | | | | | | | | Currently toasterui works only in observer mode. This is artificial limitation which was made to support current toaster design. As we decided to stop using bitbake server we'll need to run toasterui also in build mode. [YOCTO #7880] (Bitbake rev: d4b5796899c3ca5c7becd7322291afd8afb35a31) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: check if setEventMask succeededEd Bartosh2016-03-071-2/+4
| | | | | | | | | | | | | | | Currently toasterui ignores return value of setEventMask command, which created confusing difference between set of events set by this command and the real set used in the code. Checked if setEventMask succeeded. Print error message and exit if it's not. (Bitbake rev: 6e3f13ffb47102b5df2da91fbc3f5da3179245b2) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: update list of eventsEd Bartosh2016-03-071-15/+12
| | | | | | | | | | | Removed events not used in the code from the list. Added events that are used in the code. (Bitbake rev: 16b14ec16049cc2040a60ad5fc95f6e19dda91a6) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: reformat list of eventsEd Bartosh2016-03-071-9/+27
| | | | | | | | | | | Reformatted and reordered list of events to make changes easily and see them clearly in the diffs. (Bitbake rev: 42a2d1115f2b23dc063a3172285ca3be73cf70bb) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: ui: remove the puccho uibrian avery2016-03-022-880/+0
| | | | | | | | | | | This ui does not work in master, nor has it been updated for several years. [YOCTO #9178] (Bitbake rev: 9fad1d13eed1f725971e6d12d3977cd31e07019a) Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: hob: removal of hob ui and associated ui filesbavery2016-03-0217-7492/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We've been gearing up the Toaster web UI to replace the Hob (GTK+ based) UI for some time now; Hob has basically been on life support for the past few releases. As of late last month in master, Toaster has the capability to select the packages in an image, removing the last thing that Hob could do that Toaster couldn't. To recap, the reasons why Hob is being removed include: - The code is tightly woven into BitBake, making it fragile. This means it needs significant QA and maintenance on an ongoing basis. - Some of the implementation is not ideal; we'll be able to remove some cruft from BitBake and OE-Core at the same time. - It's GTK+ 2 based, not the current GTK+ 3. - Toaster is now a much more capable UI and is being actively maintained The discussion about removing hob can be found at: http://lists.openembedded.org/pipermail/openembedded-architecture/2016-February/000082.html (Bitbake rev: be2cceea159c6ca9111eff3df87b98513eab6d72) Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Allow Hob to run images on a custom simulator, other than qemuMirela Rabulea2016-02-182-18/+113
| | | | | | | | | | | | | | | | | The current behavior of Hob is that there is a "Run Image" button which becomes visible only for qemu images. My suggested change is: - if an image is selected and it is qemu-compatible, let the "Run image" button be named "Run qemu image" - if an image is selected and it is not qemu-compatible, let the same button show up with the name "Run custom image", and besides that, an option shows-up to allow the selection of the custom script (by default it points out to runqemu script) to be used for launching this custom image Note: in case there is more than one toggled image (qemu runnable or deployable), when the user clicks the "Run custom image" button, a dialog will be presented, allowing to choose between any of the existing images. [YOCTO #8940] (Bitbake rev: cc4cfc2370297b8feb2dc39d4262e73adf06c09a) Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb.ui.knotty: prefix task messages with recipe/taskChristopher Larson2016-02-161-5/+13
| | | | | | | | | An example prefix: `perl-5.22.1-r0 do_compile:` (Bitbake rev: 792b759e59e31d2e43d525a6e50d866b4f51f072) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Set exit failure code on runQueueTaskFailed eventsRichard Purdie2016-02-151-0/+1
| | | | | | | | | | | If the worker segfaults, we may never see a TaskFailed event from it, only a runQueueTaskFailed event. In this case, return_value isn't getting set leading to an incorrect exit code from bitbake. Fix by setting return_value in both places. (Bitbake rev: e5dd50e0d95d532fe31dde61f8c6b1a7a72321e9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: unset brbe variable when build finishesElliot Smith2016-02-111-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The brbe variable is set on the bitbake server when the Toaster UI starts. This enables Toaster to associate events with the correct build and build environment. However, the brbe variable is also used when a build starts to identify whether a new build needs to be created, or an existing one looked up. This causes a bug for command-line builds which happen after a Toaster-triggered build: because the brbe variable is never unset on the server or the buildinfohelper, the new command-line build events are treated as originating from the previous build. Ensure the brbe variable is reset when the buildinfohelper "closes" a build, so that each build then either sets the brbe variable (Toaster-triggered builds) or leaves it blank (command-line builds). Also modify the localhostbecontroller so that the brbe variable is not set on the server and not looked up from the server. This ensures that it is only set when the triggerBuild() method is called, and that it remains as None for command-line builds. [YOCTO #9021] (Bitbake rev: 4a6a8d0074f62208d843b06344be31ae73d9b745) 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>
* bitbake: toaster: buildinfohelper CustomImagePackage update dependency infoMichael Wood2016-02-101-15/+4
| | | | | | | | | | | Instead of keeping the original dependency information for the pool of CustomImagePackage reset it with each new build. (Bitbake rev: a0b97ffc7a468bad081ce3276c74728bf6830250) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: buildinfohelper Add the concept of CustomImagePackageMichael Wood2016-02-101-16/+89
| | | | | | | | | | | | | | | | | This adds the concept of CustomImagePackage this is similar to the way layers and recipes work in that we have a set of data which is part of the build history and a set of data which is part of the configuration data that toaster uses to guide people in configuring their project. We create a set of built_packages for every build but only create a package for configuration purposes if we don't already have one, so that the CustomImagePackage only ever contains a unique list of packages that are available to be added and removed from a CustomImageRecipe. (Bitbake rev: f81bb65883baa6c0f8a4d48a4de3291a10543992) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Don't show errors for universe provider issuesRichard Purdie2016-02-011-5/+13
| | | | | | | | | | | | When running universe builds, we don't expect an error exit code for provider warnings. Change the error messages to warnings in this case. This deals with errors causing problems on our autobuilders amongst other issues. (Bitbake rev: d4989fb0355476de172169f0698757f7360e9a1f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: BBUIHelper: Remove function findServerDetailsSujith H2016-01-301-41/+0
| | | | | | | | | | | findServerDetails function can be removed safely from the source tree. Couldn't find any files calling this function. (Bitbake rev: 46871f769db13ccd36deedc5b6f3dbc0a3d31c4b) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Set process names to be meaninfulRichard Purdie2016-01-302-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This means that when you view the process tree, the processes have meaningful names, aiding debugging: $ pstree -p 30021 bash(30021)───KnottyUI(115579)───Cooker(115590)─┬─PRServ(115592)───{PRServ Handler}(115593) ├─Worker(115630)───bash:sleep(115631)───run.do_sleep.11(115633)───sleep(115634) └─{ProcessEQueue}(115591) $ pstree -p 30021 bash(30021)───KnottyUI(117319)───Cooker(117330)─┬─Cooker(117335) ├─PRServ(117332)───{PRServ Handler}(117333) ├─Parser-1:2(117336) └─{ProcessEQueue}(117331) Applies to parse threads, PR Server, cooker, the workers and execution threads, working within the 16 character limit as best we can. Needed to tweak the bitbake-worker magic values to tell the workers apart. (Bitbake rev: 539726a3b2202249a3f148d99e08909cb61902a5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: log OSErrorException metadata eventsElliot Smith2016-01-181-0/+2
| | | | | | | | | | | | | | | | OSErrors occurring in toaster.bbclass are converted to OSErrorException metadata events. They were then being swallowed as unprocessed events by toasterui, which made them difficult to spot. Explicitly catch OSErrorException events and log them so they are easier to spot and debug. (Bitbake rev: 69f2b2bc373ce114609600b59a6b6ccef20771c9) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: listen for bb.event.MetadataEventElliot Smith2016-01-181-1/+2
| | | | | | | | | | | | | | | | | | The event mask for toasterui doesn't include MetadataEvents. This means that we're missing the ArtifactFileSize event (among others), which is the one we use to populate the SDK artifact table. Add that event type to the toasterui event mask so we can record SDK artifacts as they are created. [YOCTO #7603] (Bitbake rev: d0276a831bb8cffd42c8367895633eaa1fa1ed30) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: add provides info to the dbEd Bartosh2016-01-111-3/+8
| | | | | | | | | | | | | | | | Added new entries to Provides model and link them to Recipe_Dependency using 'via' field. This data will be used by Toaster UI to show 'Provides:' information for the recipes. [YOCTO #6169] (Bitbake rev: 336ddc8df611d4c8f1c3d3a06d0a85bb544c38bc) 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>
* bitbake: buildinfohelper: use providermapEd Bartosh2016-01-111-8/+16
| | | | | | | | | | | | | | Used providermap in store_dependency_information function to find virtual dependencies. This should fix annoying warnings "stpd: KeyError saving recipe dependency" [YOCTO #6169] (Bitbake rev: 85c416ca338c886db6e79651e44727482df9fb07) 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>
* bitbake: knotty: Use non-interactive mode as fallback for dumb terminalsRichard Purdie2016-01-081-0/+4
| | | | | | | | | | | | | | | TERM=dumb bitbake X shows no output for task status which is suboptimal. Use the non-interactive mode if the terminal doesn't support what we need for interactive mode giving a better user experience. Also print a note to the console to say this has happened. [YOCTO #8768] (Bitbake rev: 6f84cf4bd77f35fcd07e0b2f5149f1d6866a414d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: uievent: refactor retry loopEd Bartosh2016-01-061-9/+6
| | | | | | | | | | Replaced 'while' loop with 'for' loop. Made the code more compact and hopefully more understandable. (Bitbake rev: 4e1e497c8432536b3522295e5b1284844ccea056) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: uievent: get rid of EventHandler attributeEd Bartosh2016-01-061-2/+2
| | | | | | | | | | This attribute was introduced by mistake. EventHandle is used in the code for the same purpose. (Bitbake rev: 8d505ec8913a7d51de48b4f52bb64c5d6a0bb08e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: uievent: add error to registerEventHandler returnEd Bartosh2016-01-061-3/+5
| | | | | | | | | | | | | | | Current code throws Exception("Could not register UI event handler") if event handler can't be registered. The real reason of this is that cooker is in busy state. Error message lacks information about this. Added error message to the return value of registerEventHandler. Included returned error message into the log message and exception text. (Bitbake rev: 07de1ca7d57dcd0cc37406feae2949da12a3fa7a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Improve exception error messageRichard Purdie2015-12-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Instead of: """ can only concatenate tuple (not "int") to tuple """ we now see: """ Traceback (most recent call last): File "/media/build1/poky/bitbake/lib/bb/ui/knotty.py", line 324, in main termfilter.updateFooter() File "/media/build1/poky/bitbake/lib/bb/ui/knotty.py", line 210, in updateFooter lines = 1 + int(len(content) / (self.columns + 1)) TypeError: can only concatenate tuple (not "int") to tuple """ which makes tacking down and fixing the problem much easier. Also ensure we set an error exit code. (Bitbake rev: d965bcae6cfd268406a3bd1ef77c5bb6c6e1c6d7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: knotty: Fix row/column function return value issueRichard Purdie2015-12-181-1/+1
| | | | | | | | | | | | | When the row handling was introduced, one of the callbacks was missed resulting in: TypeError: can only concatenate tuple (not "int") to tuple Fix it. (Bitbake rev: 0b77cea2bf5b5f5704e2650fb0332f5d78037781) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: Update for buildstats layout changeRichard Purdie2015-12-181-5/+3
| | | | | | | | This updates buildinfo helper for the recent buildstats layout change (Bitbake rev: 30311bbe667e9f22de17fae00ff58da06a7c3e23) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Start Django machinery for database accessElliot Smith2015-12-141-0/+3
| | | | | | | | | | | | | | | | | | buildinfohelper, with the new import paths for our Django models and Django 1.8, was not getting an active connection to the database. In buildinfohelper, call django.setup() explicitly to make sure that the database connection is ready and models can be queried and saved. [YOCTO #8364] (Bitbake rev: 671aaab8cb7c494cd5c7621b45a6f41a203d8bb5) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Create default project with get_or_create* methodElliot Smith2015-12-141-2/+7
| | | | | | | | | | | | | | | | Rather than maintain data as part of the migrations (as was done for the default project previously), create the default (cli builds) project on demand as a by-product of getting it from the database. [YOCTO #8364] (Bitbake rev: 5fd8e90ab9b81d1bd0d301bc1c91228ecbbea74b) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Fix references to app pathsEd Bartosh2015-12-141-8/+8
| | | | | | | | | | | | | | | | | | | | | | The buildinfohelper runs outside of Django, but still needs access to our Django app classes. Previously, the imports referenced the toaster.* app, which worked fine. But in Django 1.8, this causes an error about the same module being loaded multiple times from different paths. Change the paths to our Django modules so they don't cause this error to be thrown. We can do this as we've added our application libraries to sys.path in the buildinfohelper anyway. [YOCTO #8364] (Bitbake rev: 070da64cf32c32b5ffc34d611b463c3a3960b419) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: process SetBRBE eventEd Bartosh2015-12-141-0/+2
| | | | | | | | | | | | | | | | | Currently BRBE is known to toasterui only when build is started. It's passed to it with BuildStarted event. This is too late as if build fails earilier than build starts toasterui can not inform Toaster about the failure. Set BRBE as soon as it's provided by Toaster. This should make toasterui to be able to inform Toaster about early build failures, e.g. failures during recipe parsing. (Bitbake rev: d7819508dac488a64be3caec88db285cda9599ab) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: toasterui Add ParseStarted/ParseProgress events to maskbrian avery2015-12-091-2/+12
| | | | | | | | | | | | | | | | Toaster is not able to see ParseStarted and ParseProgress events for command-line builds. This means it's not possible for Toaster to detect failed builds, if the failure occurs at a point before the BuildStarted event, as the build won't show up at all. Add these events to the event mask, so that Toaster's toasterui can detect and respond to them. (Bitbake rev: 16bfd3e3d145705a2b3a05648ddbcacc7a338dfa) Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>