summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/bldcontrol/management
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: toaster: detect when bitbake crashedDavid Reyna2022-03-211-2/+81
| | | | | | | | | | | | | | Add a polling check on tracebacks in a build's log. This can for example indicate that bitbake crashed, which would stop the event stream that Toaster normally uses to detect build errors. [YOCTO #14085] (Bitbake rev: 32b1c0b3477e359d2e2a61a23a294e317e417f95) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker/toaster: replaced deprecated method warn() with warning()Frazer Clews2020-02-061-3/+3
| | | | | | | | | | Removed the deprecated methods as it will only cause problems later on, and since warn() just calls warning(), it shouldn't change anything (Bitbake rev: a194f275235f22411cb2368f06a44f61ceb6a0f3) Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib: amend code to use proper singleton comparisons where possibleFrazer Clews2020-01-191-1/+1
| | | | | | | | | | | amend the code to handle singleton comparisons properly so it only checks if they only refer to the same object or not, and not bother comparing the values. (Bitbake rev: b809a6812aa15a8a9af97bc382cc4b19571e6bfc) Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib: remove unused importsFrazer Clews2020-01-191-3/+1
| | | | | | | | | | removed unused imports which made the code harder to read, and slightly but less efficient (Bitbake rev: 4367692a932ac135c5aa4f9f2a4e4f0150f76697) Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Add initial pass of SPDX license headers to source codeRichard Purdie2019-05-042-0/+8
| | | | | | | | | | | | | | | | | This adds the SPDX-License-Identifier license headers to the majority of our source files to make it clearer exactly which license files are under. The bulk of the files are under GPL v2.0 with one found to be under V2.0 or later, some under MIT and some have dual license. There are some files which are potentially harder to classify where we've imported upstream code and those can be handled specifically in later commits. The COPYING file is replaced with LICENSE.X files which contain the full license texts. (Bitbake rev: ff237c33337f4da2ca06c3a2c49699bc26608a6b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster/checksettings: allow CUSTOM_XML_ONLY setting through envAwais Belal2018-08-281-1/+2
| | | | | | | | | | | | | | | This change allows the CUSTOM_XML_ONLY toaster setting to be provided through the environment so the user can do this without mingling with the settings.xml, for scenarios where modifying settings.xml is not achievable. [YOCTO #12891] (Bitbake rev: 55333f1c3ded1c53120e6cb32b440cc707521e2b) Signed-off-by: Awais Belal <awais_belal@mentor.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Toaster: Implement the project-specific feature and releated ↵David Reyna2018-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | enhancements and defects. Here is the primary driving enhancement: * Bug 12785 - Support Project Specific configuration for external tools (e.g. ISS, Eclipse) - Isolated project-specific configuration page (full Toaster context hidden) - Support for new project, reconfigure existing project, and import existing command line project - Ability to define variables (e.g. image recipe) and pass them back to external GUI - Ability to execute the cloning phase, so that external GUI receive a buildable project - Ability to call back to the external GUI when updates are completed and ready - Compatibility of above projects with the normal full Toaster interface - Ability to pass to a 'complete' or 'cancel' web page so that the external GUI can immediately stop that Toaster instance, and not leave dangling servers nor edit sessions open Here are the supporting enhancements, where at least the back end is implemented: * Bug 12821 - Make Toaster conf changes compatible with command line usage * Bug 12822 - Support importing user changes to conf files into Toaster * Bug 12823 - Support importing user build directories into Toaster * Bug 12824 - Scan imported layers for content so that they are immediately available * Bug 12825 - show layer clone item in progress bar Here are defects fixed: * Bug 12817 - builddelete.py requires explicit 'add_arguments' * Bug 12818 - Remove orphaned imported layers when project is deleted * Bug 12826 - fix imported layer management * Bug 12819 - build using selected bitbake env, not Toaster's env * Bug 12820 - Toaster randomizes the layer order in toaster_bblayers.conf [YOCTO #12785] (Bitbake rev: 985d6cec290bdd80998a63483561a73c75d82d65) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: do not fail on optional 'custom.xml' fileDavid Reyna2018-03-281-1/+4
| | | | | | | | | | | | Explicitly capture and ignore errors when trying to load the optional 'custom.xml' fixture file. [YOCTO #12554] (Bitbake rev: 132458939d3987ebc58685397714af3d6d5cd8fd) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: handle early exceptionsDavid Reyna2017-09-111-0/+8
| | | | | | | | | | | | | | | | | Stop the pending build and report to the user if there is an internal exception due to a git error, a bitbake server error, or if the server-only mode halts due to for example a user syntax error in a layer or recipe. These exceptions were not caught because they occure before the normal toastergui processing was started. [YOCTO #12056] (Bitbake rev: 2cd664097c29ad07b08c82d07a239ca199abbc9a) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: support custom Layer Index URL and fixture overrideDavid Reyna2017-08-231-1/+4
| | | | | | | | | | | | | | | | | | | | Toaster needs to allow the custom fixture file to specific an alternate Layer Index URL for users that host their own Layer Index Server via the 'CUSTOM_LAYERINDEX_SERVER' in 'custom.xml'. Toaster also needs to allow the ability to completely override the default fixture files, otherwise that content can leak into the custom environment (by default the custom fixture is an overlay that cannot remove existing values from the default fixture) via the 'CUSTOM_XML_ONLY' value in 'setting.xml'. [YOCTO #11938] (Bitbake rev: ac29d4a9078494544a2627d8b6b021096b49cb34) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: address Django-1.10 API deprecationsDavid Reyna2017-06-282-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | There are four main API deprecations in Django-1.10: (a) String view arguments to url() must be replaced by the explicit class reference (b) New TEMPLATES stucture in settings.py consolidates TEMPLATE_DIRS, TEMPLATE_CONTEXT_PROCESSORS, TEMPLATE_LOADERS, TEMPLATE_STRING_IF_INVALID, and TEMPLATE_DEBUG (c) patterns() wrapper in url() is removed, with urlpatterns now a simple list (d) NoArgsCommand in commands() must be replace by BaseCommand, and handle_noargs() changed to handle() Also, the Django version checker must be updated to accept two digit sub-version numbers (e.g. "1.8" < "1.10") [YOCTO #11684] (Bitbake rev: e4c7a94fac7a53fc146387a57e5a09b9ec3caca0) Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: runbuilds Write the pidfile in python rather than shell scriptMichael Wood2016-11-301-7/+14
| | | | | | | | | | | | | | Write the pid file out in the start up of this management command. This ensures this has happened instead of relying on the shell command having been run which may or may not be the case. This also makes it simpler for testing. Couple of clean ups of runbuilds as identified by pyflake (Bitbake rev: 999e980ee1a58d16f33ef6c0e41aecdcd0206f39) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: checksettings Remove confusing startup messagesMichael Wood2016-10-061-2/+0
| | | | | | | | | | | | | | These "validation" messages are shown regardless as to whether the settings are being correctly set or not. For the time being remove them. [YOCTO #9097] (Bitbake rev: c57f20f9cd7cb4ea4d285291a1e71e5df7152799) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runbuilds: code cleanup - remove unused importsEd Bartosh2016-09-211-5/+2
| | | | | | | | | | Fixed pylint warning: W0611(unused-import): Unused import (Bitbake rev: 49731a1a2b2b63c1a897d2e33bca4968524e8710) 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: runbuilds: code cleanup - whitespaces, long linesEd Bartosh2016-09-211-19/+15
| | | | | | | | | | | | | | Fixed following pylint warnings: C0330(bad-continuation): Wrong hanging indentation before block. C0326(bad-whitespace): No space allowed around keyword argument assignment C0326(bad-whitespace): Exactly one space required before assignment C0301(line-too-long): Line too long (Bitbake rev: 0eecd660e374a4dbcefe4c59f4c8654bf3a0e937) 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: runbuilds: process builds on startEd Bartosh2016-09-211-0/+2
| | | | | | | | | | | | If Toaster is stopped incorrectly there could be some build requests and builds in incorrect state left from the previous run. Running main processing function on start should take care of those. (Bitbake rev: 6b9f8f6bb51d1aa2ca4effc34e076e331d0cb8d1) 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: runbuilds: process builds on SIGUSR1Ed Bartosh2016-09-211-2/+4
| | | | | | | | | | | | | | | | | Run main processing function 'runbuild' only if SIGUSR1 is received. This signal is sent by Toaster when build status is changed (either started, cancelled or finished). This should stop continuous database polling as run_builds function will be called only when needed, i.e. after build status is changed. [YOCTO #8918] (Bitbake rev: 62d598cc5aa01d23f1e9284e9e926bd55b1d1878) 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 oe-core fixtureMichael Wood2016-09-021-4/+6
| | | | | | | | | | | | | | | | Due to a copy paste error we managed to get some of the wrong information in the oe fixture that provides a suggested default settings for Toaster. This meant it tested correctly when it shouldn't have. Fix: - The use of local bitbake - An incorrect call to realpath which didn't include its parent module. - The field used for the local_dir of an existing openembedded-core (Bitbake rev: d57a9124650e5367919668dfccf6aad4962a77f1) 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: Remove old toaster config loading mechanismMichael Wood2016-08-112-212/+0
| | | | | | | | | | | This has been replaced using django's inbuilt loaddata. Django command documented at: https://docs.djangoproject.com/en/1.8/ref/django-admin/#django-admin-loaddata (Bitbake rev: 3edd33aff2b9eef82090dc4f9b5461f901aec8be) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: checksettings call django's loaddata instead of custom commandMichael Wood2016-08-111-11/+44
| | | | | | | | | | | | | | | | Call django's inbuilt loaddata command to load the appropriate fixtures. We also attempt to load a fixture called "custom" and fail silently if we don't have one. This is where initial customisations can be done to load particular settings or data into Toaster (for example layers or default values for variables) Make sure the value for TEMPLATECONF is available to checksettings so that we can have a go a working out which default data to load. (Bitbake rev: 7d14ca8cbabbb893e507a66e4cc6e3e77c1e8c84) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: loadconf Partially add back some of the layerSource parsingMichael Wood2016-07-261-3/+82
| | | | | | | | | | | | Partially add back a revised version of the layersource handling so that we can continue to support the old toasterconf.json and it's setup of the local project. (Bitbake rev: cc1a1bc2ea6ae058278d4ecf483f5ea00502c6cb) 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 Remove the layerindex specific up_branch fieldsMichael Wood2016-07-261-1/+1
| | | | | | | | | | | | | | | | | | We don't need to keep track of layerindex data in our database. And using branch==release is very confusing in the schema. Instead use the existing Release definition to keep track of which release a layer_version is for. Remove the Branch model and all references to it. Create a migration path to convert from up_branches to their corresponding releases. (Bitbake rev: f8f4cffe6fd371f3a7e63690c68f3fcb5dc1f297) 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: tests: Remove references to LayerSource modelMichael Wood2016-07-261-18/+0
| | | | | | | | | | | | Remove and replace layersource model references in the tests and test data. Remove the orm/test as this only tested LayerSource interactions which have now been removed. (Bitbake rev: 61a47cbc92c856690cb0e8da7102b2e669eaee0a) 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: loadconf remove Loading LayerSourcesMichael Wood2016-07-261-67/+2
| | | | | | | | | | | We don't need to configure layer sources in the initial configuration as this information is provided by the models. (Bitbake rev: fd56c152699bc4c2d22b87728d0fefbff5209135) 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: fix wrong usage of print_exc and format_excEd Bartosh2016-06-152-3/+3
| | | | | | | | | | | | | | | | | | | | First parameter of traceback.print_exc and traceback.format_exc APIs is a 'limit' - a number of stracktraces to print. Passing exception object to print_exc or format_exc is incorrect, but it works in Python 2 and causes printing only one line of traceback. In Python 3 comparison of integer and exception object throws exception: TypeError: unorderable types: int() < <Exception type>() As these APIs are usually used in except block of handling another exception this can cause hard to find and debug bugs. (Bitbake rev: c5a48931ac8db9e56f978c50861c19d0d0c808e3) 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: use decode('utf-8') for binary dataEd Bartosh2016-06-021-1/+1
| | | | | | | | | | | | | Decoded binary data to utf-8 to fix the following error when runnign on python 3: TypeError: Type str doesn't support the buffer API [YOCTO #9584] (Bitbake rev: 752ea00919ef054622a51ce097923309934eff2b) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix local importsEd Bartosh2016-06-022-2/+2
| | | | | | | | | | | | | | Replaced local imports with absolute imports. Used .module for local imports. This should make the code to work on python 2 and python 3. [YOCTO #9584] (Bitbake rev: 3f1e68c783308dcb51242d0fdeef758e581ccc8c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: use force_text instead of force_bytesEd Bartosh2016-06-021-2/+2
| | | | | | | | | | | | | | | | Usage of force_bytes in BuildRequest.__str__ method caused python 3 to throw "__str__ returned non-string (type bytes)" error. Replaced force_bytes with force_text to make the code working on both python 2 and python 3. [YOCTO #9584] (Bitbake rev: 9dd9c1393a84d1110c647e84253af8e0bb6acc45) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: runbuilds move the execution sequence out of the poll loopMichael Wood2016-05-201-15/+16
| | | | | | | | | | | | | Move the execution sequence for a build out of the polling loop and into it's own fuction. This means that we can call the function on it's own if we just want to trigger one build rather than infinite polling. This is something needed for the build tests. (Bitbake rev: e8e059602c31394a4be5293e2ca0b8434fb4a8cf) 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: bin, toaster: Fix print and exception syntaxRichard Purdie2016-05-111-9/+9
| | | | | | | | | This updates the print "" syntax to print() and fixes some exception handling syntax such that its compatible with python v2 and v3. (Bitbake rev: 58304fcce9727fd89564436771356c033ecd22a3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Update logger.warn() -> logger.warning()Richard Purdie2016-05-111-3/+3
| | | | | | | | | | python deprecated logger.warn() in favour of logger.warning(). This is only used in bitbake code so we may as well just translate everything to avoid warnings under python 3. Its safe for python 2.7. (Bitbake rev: 676a5f592e8507e81b8f748d58acfea7572f8796) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: runbuilds Clean up runbuildsMichael Wood2016-04-061-29/+52
| | | | | | | | | | | | | - Organise the imports into logical groups - Fix 80 col wrapping - Remove catch all exceptions - Log to the toaster log - Use QuerySet functions such as .first() and Q() (Bitbake rev: c382f550c62437954205c7dd9c7e1891d5d03945) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: runbuilds Make runbuilds aware of the build CANCELLED stateMichael Wood2016-04-061-4/+22
| | | | | | | | | | Add handlers to make sure we remove the BuildEnvironment LOCK when we have cancelled a build. (Bitbake rev: 23d0a7f9664450a09c2610631b38590a09b33744) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add brbe parameter to triggerBuildEd Bartosh2016-04-061-4/+2
| | | | | | | | | | | Called triggerBuild with brbe parameter instead of adding TOASTER_BRBE variable to the database and fetching it in triggerBuild. (Bitbake rev: 669bb3f6865d8bb89cd94ef9d0eba3346c47d7b2) 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: use force_bytes to display non-ascii project namesSujith H2016-03-091-1/+1
| | | | | | | | | | | | | | | | | When user enters a non-ascii character in the project name of toaster, the build doesn't get triggered. Use force_bytes to fix this. Also deal with non-ascii project names when logging the build request in runbuilds. [YOCTO #9071] (Bitbake rev: b6141c4d170885d3bdf63074afcb1e41fde0a8f0) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: use OneToOneField instead of ForeignKeyEd Bartosh2015-12-141-1/+1
| | | | | | | | | | | | | | | Used OneToOneField to reference BuildRequest in BRBitbake model. Fixed django warning: WARNINGS: Setting unique=True on a ForeignKey has the same effect as using a OneToOneField. (Bitbake rev: aaa4319ebbb06facb77b4ba936cf3aa2068ff238) 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: Update API used to make runbuilds methods run in transactionsElliot Smith2015-12-141-2/+2
| | | | | | | | | | | | | | | runbuilds previously had its methods decorated with transaction.commit_on_success, which is now deprecated. transaction.atomic is an (almost) drop-in replacement for this, so use this instead. [YOCTO #8364] (Bitbake rev: c4804b84eaaef6a81027bae5cf8bfe63d949c293) 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: make runbuilds to loopEd Bartosh2015-12-071-3/+10
| | | | | | | | | | | | | Made runbuilds to loop to avoid having a loop in shell code and initialize heavy Django init machinery every second. Ignored exceptions to prevent exiting a loop. (Bitbake rev: e04da15556ca0936de652b8c085e4199e5551457) 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: get rid of interactivity in bldcontrolbrian avery2015-10-111-101/+37
| | | | | | | | | | | | | | | | | | removed layer dir questions and base off TOASTER_DIR removed build dir questions and base off TOASTER_DIR base configuration file off of TOASTER_CONF fixed some pylint issues [YOCTO #8217] (Bitbake rev: d5811968b5f22093365f381fb7e75ab46e5269c2) Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: store task name in Target objectsEd Bartosh2015-09-231-1/+1
| | | | | | | | | | | | | | | Information about a task is not stored in Target objects. This makes it impossible to correctly operate with the builds where task is specified. Storing taks name is an enabler for other fixes in UI and backend related to restarting builds. (Bitbake rev: 0a69a8a18075c976ed8681d9d75529f8c2f48514) 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: toaster: Avoid unnecessary local to local copy of cooker logElliot Smith2015-09-182-44/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cooker log is copied from its original (bitbake) location to an artifact directory chosen by the user (chosen when checksettings.py runs as part of the managed mode; it's one of the annoying questions you're asked at startup). The copy happens as part of the runbuilds script run, which is started in a loop from the toaster startup script in managed mode. When a user requests the log for a build via toaster, they are getting the log which has been copied to the artifact directory, not the original bitbake log. This works for the managed case, where the runbuilds command is running in a loop and copying log files for completed builds to the artifact directory. However, in analysis mode, there are two problems: 1. checksettings isn't run, so the artifacts directory isn't set. toaster is then unable to figure out where the log files should have been copied to. 2. The log files aren't copied to the artifacts directory anyway, as runbuilds isn't running in analysis mode. To fix this, just point the user to the local bitbake log file in its original location. This avoids the copy step, and means we can remove a whole question from the toaster startup sequence, as we no longer need an artifact directory. The only downside to this is that it's not appropriate for remote bitbake servers. We will need to revisit this and possibly reinstate the copy step once we have to reconcile local and remote builds and make their logs available in the same way. [YOCTO #8209] (Bitbake rev: 5697bbcc88edad85891f66d28b8803a9c9d27ff2) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: improve explanation of checkout dirBelen Barros Pena2015-09-041-16/+16
| | | | | | | | | | | | | | | | Improve the explanation we show to users during set up when asking them to set the layers checkout directory. The patch also makes minor changes in text formatting to improve legibility. [YOCTO #7740] (Bitbake rev: dd9284944ae0f0feecb70adab880fed636f7cd59) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix updates on failed build requestsAlexandru DAMIAN2015-08-191-1/+1
| | | | | | | | | | | | | | The patch to fix the original mistake is wrong, in the sense that a constant from the BuildRequest class is used on the build object. Fixing the patch to bring in the correct constant in. (Bitbake rev: a740c17efc0ccc9f89a428ead08f9739af3c6de4) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: replace raising Exceptions in loadconfAlexandru DAMIAN2015-08-191-14/+23
| | | | | | | | | | | | | | | | | | | This patch replaces throwing Exceptions in toaster loadconf command with proper explicit error messages. This allows the user to properly understand and debug what went wrong when loading a config file. Additionally we change a bit the logic around auto-detecting relative giturl handling so the user gets proper error messages when trying to load an invalid toasterconf.json file. [YOCTO #7945] (Bitbake rev: 3d14cc033a855bf5b20e799438548b6d8f29d9b8) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: checksettings: fix TEMPLATECONF detectionAlexandru DAMIAN2015-08-191-1/+7
| | | | | | | | | | | Improving the TEMPLATECONF detection by verifying the return code and dumping extra debug information in case of exception. (Bitbake rev: bdc00755993aa37e7669c3859ef4ea9b1fc3e680) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: checksettings: fix guesspath initializationAlexandru DAMIAN2015-08-191-1/+3
| | | | | | | | | | | Object fields need to be instantiated in the constructor. Fixed prompted by pylint. (Bitbake rev: 40db75c6117c3226c27d278d2acf0cd3ba61a167) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: pylint fixesAlexandru DAMIAN2015-08-191-1/+2
| | | | | | | | | | | | This patch fixes imports, default parameters to functions, incorrect overloading and exception handling issues highlighted by pylint. There are no functional changes. (Bitbake rev: 066e096b80dcb0e93e1a088acf5d914184361769) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Fix typo in set up script outputBelen Barros Pena2015-08-171-1/+1
| | | | | | | | | | | Removing an spurious 'it' when setting the build directory. Thanks to Scott Rifenbark for finding the typo! (Bitbake rev: dd644a2c87e651c3990520759bab55a56ba110d1) Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: runbuilds Fix incorrect variable nameMichael Wood2015-07-021-1/+1
| | | | | | | | | | The recent refactoring moved this enum value to BuildRequests table rather than Build. (Bitbake rev: 4338ab03826df3353e1222f0bd825dfdd04dd933) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: bldcontrol Ignore toasterconf files in own directoriesMichael Wood2015-06-261-0/+2
| | | | | | | | | | | | | If toaster has previously cloned poky or a layer with a toasterconf file we don't want this to be picked up as a choice as these clones are "internal" to toaster and may have undesired effects on toaster's setup. [YOCTO #7741] (Bitbake rev: 2f74ff59f2873c1cf121f7a385f3ab971c793a9c) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>