summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/bldcontrol/management/commands/checksettings.py
Commit message (Collapse)AuthorAgeFilesLines
* 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-041-0/+4
| | | | | | | | | | | | | | | | | 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: 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: 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-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 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: 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: 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-111-33/+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: fix wrong usage of print_exc and format_excEd Bartosh2016-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | 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: fix local importsEd Bartosh2016-06-021-1/+1
| | | | | | | | | | | | | | 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: 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: 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: Avoid unnecessary local to local copy of cooker logElliot Smith2015-09-181-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 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: 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>
* bitbake: toaster: refactor checksettings commandAlexandru DAMIAN2015-05-291-2/+24
| | | | | | | | | | | | | | This patch refactors the checksetting command to prevent early return from the handle function. It also adds a check that marks IN PROGRESS builds at startup time as FAILED. Minor changes to BuildRequest and Build classes ensure useful string representation for the objects. (Bitbake rev: adf67dd79dbf6b585bf8cd54f99c389409b88ecd) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: bitbake cooker log saving and downloadingAlexandru DAMIAN2015-02-201-0/+17
| | | | | | | | | | | | | | | | | | | | | This patch brings in cooker log saving and proper download links. * toasterui will now write the cooker log file if running in managed mode * the BuildRequest has a new state, REQ_ARCHIVE, indicating that the build is completed, and the artifacts are ready to be grabbed * the runbuild test execution commands will gather needed artifacts, and save them to a storage directory selected during Toaster setup. * the build dashboard, project builds and all builds pages have permanent links for the cooker log [YOCTO #7220] [YOCTO #7206] (Bitbake rev: fad80e36c9da663b000cdf2cb3c75440c6431d84) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: enhancements for the startup sequenceAlexandru DAMIAN2015-02-101-18/+58
| | | | | | | | | | | | | | | | | | | This patch brings fixes and enhancements in the startup sequence. - the dependency version checking is now correctly enforced when starting in both modes - fixed errors in looking up environment variables - added message with 'daemon' program start location - presenting menu for selecting config file [YOCTO #7283] [YOCTO #7291] [YOCTO #7273] (Bitbake rev: c5ddd9d88910857a1b745b1c237df0390dd56835) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update texts for the startup sequenceAlexandru DAMIAN2015-01-301-7/+14
| | | | | | | | | | | | | | | This patch updates the prompts to the user to better explain what Toaster is doing and the information it needs from the user. Additionally, fixes a check in loadconf command. [YOCTO #6785] [YOCTO #7251] (Bitbake rev: 90ef8975f35e2da824bc1c80e41ca26d9af0b208) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: add extra debug and development infosAlexandru DAMIAN2014-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | We update and add logs throughout the code in order to help with development. The extra logging is turned off by default, but it can be enabled by using environment variables. All logging happens through the Python logging facilities. The toaster UI will save a log of all incoming events if the TOASTER_EVENTLOG variable is set. If TOASTER_SQLDEBUG is set all DB queries will be logged. If TOASTER_DEVEL is set and the django-fresh module is available, the module is enabled to allow auto-reload of pages when the source is changed. (Bitbake rev: 10c27450601b4d24bbb273bd0e053498807d1060) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: display Toaster exceptions and other fixesAlexandru DAMIAN2014-11-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Changing ToasterUI to log toaster exceptions on a different level than build errors. Updating the build dashboard to show Toaster exceptions. We add extra logging to console for exceptions. Fixed a problem where packages database entries were created instead of being looked up in the database, conficting with entries created to satisfy dependency information. Toaster now checks for invalid states at startup and performs needed cleanups. Removed loading reference to jquery-ui.min.css as we do not have this file. (Bitbake rev: 2378812bc24d433125fb940f110154f0ce638448) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: layer name correlationAlexandru DAMIAN2014-11-211-12/+35
| | | | | | | | | | | | | | | | | | | | | | | | | This patch modifies how layers are identified and matched. Layers were primarely organized by the source of layer information, and Releases were separated by both layer git branches and originating source of layer information. This setup prevented mixing layers from different sources for a certain release, which didn't match the way people use Yocto Project / bitbake. This patch brings name-based indentification, where layers with the same name are assumed to be equivalent, in the sense of being able to substitute one another. To facilitate this identification to humans, layers are differentiated by GIT URI instead of layer sources, which was a rather arbitrary abstraction. Additional changes include modification to models in order accomodate for the new data structure, and to config file loading to match the new toasterconf.json layout. (Bitbake rev: 4357200aed522ad56cfd84917f877645b83b6a70) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: separate the load configuration file commandAlexandru DAMIAN2014-11-121-134/+5
| | | | | | | | | | | | | We separate the load configuration command as to allow system administrators load toasterconf.json file as part of the setup process. [YOCTO #6895] (Bitbake rev: 3ed596ac4e21a4494fd7f6cd8739d460fd98512f) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update Release model to pinpoint to specific BranchAlexandru DAMIAN2014-11-121-5/+4
| | | | | | | | | | | | | | | We update the release model to pinpoint to specific branch, instead of holding a branch name that needs to be matched. This is needed because we move away from mixing branches on different layer sources. Various minor changes to models file. (Bitbake rev: d58aacc69b1832f99758b941803123329e06082d) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterbld: update checksettings commandAlexandru DAMIAN2014-10-301-5/+42
| | | | | | | | | | | | | We update the checksettings command to allow for upstream git url detection at runtime by looking up a named remote of a local repository. Also various small fixes in check settings. (Bitbake rev: c127ecb3b5b27b705b8714af063d910b944c8bbc) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update checksettings command for auto-detectionAlexandru DAMIAN2014-08-291-8/+182
| | | | | | | | | | | | | | | | | We enhance the checksettings command to try to automatically detect settings for running on localhost. The checksettings will look for a nearby poky layer source, for a nearby build directory, and will try to import settings from "toasterconf.json" files found in the local layer. On new configuration, it will also perform updates from the layer source. (Bitbake rev: 2aab77dfccb538e2b09829841ea6c464d40cafb1) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: move bldcontrol initial_data fixture to codeAlexandru DAMIAN2014-07-231-0/+5
| | | | | | | | | | | | | | | We move the initial_data fixture to a code migration, in order to make sure that we don't overwrite modified data. The data is inserted only if no data is present, instead of always overwriting the entry. The check settings returns 0 if the check was ok. (Bitbake rev: 525c316ac95c06c52fbcfc836ca5599ee9dbfe8b) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add fields for sourcedir and builddir pathsAlexandru DAMIAN2014-07-231-0/+33
We add explicit absolute paths for a directory where the layer sources will be checked out (sourcedir) and where the build activities will take place. Adding minimal checking when starting the application in order to make sure that BuildEnvironment (BE) settings are usable. This check is ran by the toaster script at startup. Modify the localhost bbcontroller to use the BE settings instead of trying to self-configure on checked out sources. (Bitbake rev: d17500d3f73fdeeef5f11fb3773a65e927be3f02) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>