aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2020-03-29toaster: FieldError loading Reverse runtime dependenciesReyna, David
When selecting reverse runtime dependencies, filter on simply 'depends_on' instead of the obsolete 'depends_on__name' or 'depends_on__size'. [YOCTO #13717] Signed-off-by: Ahmed.Hossam <Ahmed.Hossam@opensynergy.com> Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-29toaster: support environment-safe manage commandsReyna, David
Directly support the various 'manage' commands from the Toaster executable, so that users do not have to manually set up the required environment and paths. Examples: $ . toaster manage createsuperuser $ . toaster manage lsupdates [YOCTO #13170] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-29toaster: update to DunfellReyna, David
Toaster needs update to Dunfell [YOCTO #13847] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-29toaster: migrate to Django-2.2David Reyna
Toaster migration to Django-2.2. Django-1.x has been deprecated. [YOCTO #13207] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-24Revert "fetch2: Allow ${AUTOREV} to be used when BB_SRCREV_POLICY is "cache""Khem Raj
As per mailing list discussion, the cache policy was behaving correctly before and wouldn't expect to update after the initial fetch even for AUTOREV. This reverts commit ba093a38539960e645e994a66ed7872a604c00a9. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-24tinfoil: Add iterator support for DataStoreConnectorRichard Purdie
Some usages need to iterate the datastore. This is slow and not recommended but support this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-24tinfoil: Simplify remote datastore connectionsRichard Purdie
The current approach to remote datastores used in tinfoil is breaking. For example, adding a devupstream extension to a recipe with a git upstream, making it the preferred version and then running "devtool modify" on it causes get_srcrev() circular dependency issues. The problem is the override handling in the datastore is broken. This gets broken since remotedata:recieve_datastore() sets d.dict but doesn't update d.overridedata (or d.inchistory or d.varhistory). We could play whack-a-mole but the current implementation seems to be flawed to me. It also doesn't cover, or only partially covers some datastore operations and each needs new dedicated command API. Instead, step back and reimplement the way the datastore connector works. With this change, the datastore is either remote or local but the data is not spread on two sides of the connection. All the API is proxied over the connection by a single function for the datastore (and two to support variable history and include history). This code does not support using the datastore as a parameter to any data store functions. We did have one case of that but its just bad code and can be replaced. The result is something which is much simpler and less invasive to the datastore code itself, meaning its behaviour should be much more consistent. The existing tests for the remote data no longer make any sense and are removed. The one bug this code would have is if key/value pairs are returned over the IPC and those values contained a DataSmart object since we don't recurse into return values to find such things. Nothing appears to do that currently so lets worry about it if its ever an issue. This change should simplfy a ton of other issues and avoid a ton of other bugs so is a huge net gain. Tested with bitbake's and OE's selftests. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-23data_smart: Don't pass unneeded datastoreRichard Purdie
The datastore is already available to this function internally so don't also try and pass the datastore as a parameter. This is clearly broken API when you look at the existing calls to it. This then doesn't break the planned tinfoil data connector changes. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-23tinfoil: Drop parse_recipe_file custom datastore supportRichard Purdie
This parameter is unused except for a single selftest and is problematic with regard to fixing some other bugs. Remove it for now, if really needed we could re-implement it in some other way in the future. Experience tells us we likely don't want to support this kind of change to the metadata anyway as its not as useful as it first sounds/appears. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-19bitbake-user-manual: immediate-variable-expansion: Correct descriptionJacob Kroon
References to undefined variables are preserved as is and do not expand to nothing as in GNU Make. Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-19bitbake-user-manual: Fix order of end tagsJacob Kroon
Fixes commit e22565968828c86983162e67f52ebb106242ca76. Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-13tinfoil: Update to match recent knotty console changesRichard Purdie
This updates tinfoil to match recent changes to the logging code in knotty. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12knotty/msg: Use logging.shutdown() instead of bb.msg.cleanupLogging()Joshua Watt
The logging module provides a shutdown() function that does the same thing in a much better way Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12knotty: Treat verbconsole as a console outputJoshua Watt
The BitBake.verbconsole needs to be treated like a console output logger (meaning that the TerminalFilter attaches an InteractConsoleLogFilter to it), even if it's not directly attached to the root 'BitBake' logger. First, assign a special "is_console" property to the relevant handlers, then look for the property in the handlers from the configuration object return by bb.msg.setLoggingConfig(). Finally, pass the list of all handlers to the TerminalFilter object; it doesn't care about the difference between console and errconsole, so pass all the relevant handlers as a list. This fixes cases where the console output was corrupted when messages were sent to the 'BitBake.verbconsole' handler. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12msg: Return config objectJoshua Watt
Returns the configuration object from setLoggingConfig(). This object has a config dictionary that contains all of the created handlers, filters and loggers, which makes it much easier to pull out items with specific names. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12knotty: Update hash equivalence loggingJoshua Watt
Updates hash equivalence logging so that the interesting VERBOSE messages are always logged to the consolelog file so that issues in individual user builds can be diagnosed. The autobuilder logging config then updates this so that they also are shown on stdout, since the consolelog file is not capture there. In order to facilitate this, 2 new logging handlers were added, "BitBake.verbconsole" and "BitBake.verbconsolelog". Neither of these handlers are attached to anything by default, but they will log any messages that wouldn't otherwise be logged by the normal console or consolelog handlers. Users can attach whatever loggers the desire to this handler to get them to appear on the console or in the consolelog, as demonstrated by the autobuilderlog.json file. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12contrib: Add autobuilder logging configurationJoshua Watt
Adds a configuration file that the autobuilder can use to capture interesting logging domains above the ones that show up for normal users on stdout/stderr. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12runqueue: Lower setscene complete logging levelJoshua Watt
Lowers the level of the log message when setscene tasks have completed. This message can occur multiple times when hash equivalence is enabled, since the runqueue switches between executing setscene tasks and normal tasks. Since this is primarily of use when debugging hash equivalence, use the hash equivalence logger at VERBOSE level. [YOCTO #13813] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12msg: Add helper to merge logging configsJoshua Watt
Adds a function that can be used by UI front ends to merge logging configuration fragments. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12knotty: Add logging cleanupJoshua Watt
Adds code to close all loggers when bitbake exits. This prevents unclosed file ResourceWarnings. A form of this closing existed previously, but was removed in the new logging code. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12bitbake-user-manual: Add documentation for BB_LOGCONFIGJoshua Watt
Adds documentation describing how to use the BB_LOGCONFIG variable to enable custom logging. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12runqueue/siggen: Lower hash equivalence loggingJoshua Watt
Lowers the level at which hash equivalence messages are logged so as to not annoy the majority of users. The autobuilder can use a custom logging configuration to log these to a file for debugging (see contrib/autobuilderlog.json) [YOCTO #13813] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12runqueue/siggen: Log hash equivalence with a different loggerJoshua Watt
Switches the hash equivalence logging to use a different logger so that it can be easily filtered out with python's structured logging. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12bitbake-worker: Remove unnecessary addDefaultLogFilterJoshua Watt
Adding the default log filter here is unnecessary because there are no defined logging domains when it is called, which means it does no actual filtering. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12knotty: Setup logs with config helperJoshua Watt
Sets up logging in knotty to use python's structured logging config and the bb.msg.setLoggingConfig() helper to setup logging. This allows the user to specify additional logging mechanism in a config file with BB_LOGCONFIG Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12knotty: Remove dependency on format variableJoshua Watt
Passing around the log formatter variable was unnecessary since the log levels of interest can be accesses as class members of bb.msg.BBLogFormatter. Switching to do this will make using the structured python logging much easier, since it can be difficult to extract out the formatter for a specific handler. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12lib/bb/msg: Add helper to set logging configJoshua Watt
Adds a helper function to setup the structure logging information in bitbake. The helper function takes a default configuration and an optional path to a user config file that can be merged into the default. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12lib/bb/msg: Remove unused filtersJoshua Watt
Now that the filter are described using the python logging structure, these classes are no longer needed. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12lib/bb/msg: Add filter utilitiesJoshua Watt
Adds generic filter utilities that can be used to filter when the log level is greater than or equal to a defined value, or below a defined value, as well as a generic function to translate a string to a logging level (or bitbake logging level) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12knotty: Add commented logging_tree codeJoshua Watt
Adds a comment section that can be easily uncommented to enable dumping the logging tree. This module is extremely useful for debugging issued with logging configuration Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12lib/bb/msg: Add repr for BBLogFormatterJoshua Watt
Adds a __repr__ function for BBLogFormatter. This allows it to get a human readable string when printed using the logging_tree module Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12lib/bb/msg: Use log level instead of debug countJoshua Watt
Passes around the actual logging level as the default log level variable instead of the debug count. This makes it easier to deal with logging levels since the conversion from debug count and verbose flag only has to occur once when logging is initialized and after that actual log levels can be used Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12knotty: Handle logging messages with specific loggerJoshua Watt
Handles the log messages from the bitbake server with the specific logger that the event originated from. This allows hierarchical logging configurations to work as expected. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12lib/bb/msg: Convert default domains to a dictionaryJoshua Watt
Converts the default domain variable to a dictionary where the keys are the logging domains and the values are the logging level (instead of the debug count). This makes it easier to deal with the logging domains and the awkward conversion from a list to a dictionary only needs to be done once when logging is initialized. Finally, other code has been written that already assumes this variable is a dictionary, see: f04cd93109 ("bitbake: lib/bb: Optimise out debug messages from cooker") Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-11tests: Add test for gitsm fetcher with shallow mirror tarballsPaul Barker
Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-11fetch2/gitsm: Unpack shallow mirror tarballsPaul Barker
When a shallow mirror tarball is used to satisfy a gitsm URI it needs to be unpacked temporarily so that the .gitmodules file can be examined. Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-06build.py: augment TaskBase to capture PN and PVChris Laplante
PF is already captured, but it's a pain to try to parse out PN and PV, which can be helpful to have available. Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-06ui/teamcity: add a TeamCity service message frontendChris Laplante
Exposes build status via TeamCity service messages, see https://www.jetbrains.com/help/teamcity/build-script-interaction-with-teamcity.html. Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-06runqueue: teach runonly/runall to accept "do_task" as well as "task"Chris Laplante
Previously --runonly=do_task would give a misleading error like: ERROR: Could not find any tasks with the tasknames ['do_task'] to run within the recipes of the taskgraphs of the targets... The problem is that BitBake tried to find "do_do_task". So teach it to only add the do_ prefix if it's not already there. Signed-off-by: Chris Laplante <chris.laplante@agilent.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-06bblayers: query: Add multiconfig optionJoshua Watt
Adds an option to the show-recipes subcommand that allows the user to specify which multiconfig should be shown. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-06tinfoil: Add multiconfig supportJoshua Watt
Adds support for the Tinfoil cache adaptor to be bound to a specific multiconfig and invoke the appropriate commands for that multiconfig instead of the default. The cooker adapter now creates a cache adapter for each multiconfig specified in BBMULTICONFIG so that each multiconfig is present. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-06cooker: Respect multiconfig parameterJoshua Watt
The cooker had a multiconfig parameter for the findProviders() and findBestProviders() API, but it was being ignored. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-06command: Add mc parameter to findProviders commandJoshua Watt
Adds a multiconfig selection parameter to the findProviders command. This allows a client to find the providers for a specific multiconfig instead of the base configuration. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-02cooker: Reset parse status unpon clientCompleteRichard Purdie
If for example a tinfoil connection edits the datastore, a subsequent connection can be "corrupted" by those changes. By setting the parse status of the caches as False at exit, the behaviour becomes the same as a newly setup server as a new data store is setup. This avoids problems in tests when BB_SERVER_TIMEOUT is set as the server is properly reset between connections. [YOCTO #13812] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-02fetch2: Limit shown checksums to sha256Richard Purdie
Currently bitbake will list many checksums for a recipe when none are present, encouraging users to add them all to a recipe. We don't need/want them all. We used to show md5 and sha256 but given the concerns about md5, switch to showing just sha256 going forward which seems like the sensible one to standardise upon. There will be no change to existing recipe functionality. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-22lib/bb/utils.py: Preserve ownership of symlinkDaisuke Yamane
Yocto Bug: https://bugzilla.yoctoproject.org/show_bug.cgi?id=13806 Uncomment lchown() to preserve ownership of symlink. Signed-off-by: Daisuke Yamane <daisuke.yamane@cybertrust.co.jp> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-20fetch2/svn: Avoid UnboundLocalError exceptionRichard Purdie
The update codepath would trigger: Exception: UnboundLocalError: local variable 'svnfetchcmd' referenced before assignment Fix this so the code functions as intended in both fetch and update cases. [YOCTO #13798] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-19layerindex: allow clones to be shallowJan-Simon Moeller
When bitbake-layers fetch-layerindex clones the repositories, these are full clones. Allow the user to specify '-s' and do shallow clones instead for faster downloads. Signed-off-by: Jan-Simon Moeller <dl9pf@gmx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-19fetch2: svn: care for path_specJens Rehsack
Documentation says: "path_spec": A specific directory in which to checkout the specified svn module. but existing svn fetcher uses "module" always as path of checked out svn-module, regardless whether path_spec was given or not. Signed-off-by: Jens Rehsack <sno@NetBSD.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-19event: Remove duplicated items from close matchesRobert Yang
It printed duplicated ones when there are multiple similar recipes in differrent layers, for example, if python-lockfile in different layers, and there is no python3-lockfile: $ bitbake python3-lockfile ERROR: Nothing PROVIDES 'python3-lockfile'. Close matches: python-lockfile python-lockfile python3-aiofiles Remove the duplicated ones to fix the problem. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>