summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-05-10bb/fetch2: drop checksum cachemarquiz/bitbake/checksum-refactorMarkus Lehtonen
It is not used for anything, anymore. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2016-05-10SignatureGenerator: make checksum_cache arg of get_taskhash() mandatoryMarkus Lehtonen
Drop support for the "old" API. Now anyone extending SignatureGenerator by overriding get_taskhash() has to use the new function prototype. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2016-05-10SignatureGenerator: add checksum_cache argument to get_taskhash()Markus Lehtonen
Extend the SignatureGenerator API by adding a new argument to get_taskhash() for defining the file checksum cache to use. If the checksum cache argument is not provided, we use the cache in bb.fetch2, as before. This is a step towards removing checksum cache from bb.fetch2. Unfortunately, extending the API is a bit more involved than just adding a new optional argument because it has a sort of cyclic dependecy: the API is defined in bitbake, the implementation may be modified elsewhere (e.g. oe.sstatesig in oe-core layer) by overriding SignatureGenerator's method(s), which are eventually consumed back at bitbake. In bitbake, we must be prepared to use the old interface because oe-core may override our new shiny API with an old one. Thus, we need to inspect the API in RunQueueData and adjust call arguments accordingly. If the signature generator instance implements the new API, we use a checksum cache instance specific to runque. Print a warning if an implementation of the old API is detected. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2016-05-10Move file checksum cache out of SignatureGeneratorMarkus Lehtonen
Just utilize the checksum cache in bb.fetch2 as it is not used for anything else. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2016-05-10bb/siggen: drop commented-out codeMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2016-05-06bb.{cooker, data}: only emit a var as python if 'func' is setChristopher Larson
This avoids a common issue where PACKAGECONFIG is emitted as a function in bitbake -e when the 'python' flag exists. It isn't a python function unless both 'func' and 'python' are set. This aligns with the behavior of emit_func_python. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06bb.utils: let loaded plugins provide a plugin objectChristopher Larson
This lets us avoid treating the module like an object, so no globals are needed, if one chooses to do so. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06bb.utils: use imp.get_suffixes for load_pluginsChristopher Larson
Rather than hardcoding .py, use python's knowledge of its file extensions. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06bb.utils: add load_plugins from scriptutilsChristopher Larson
Imported as of oe-core 184a256. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06bb.data_smart: use iter() for __len__Christopher Larson
It seems the frozenset constructor in pypy runs len(), so we can't pass the DataSmart instance directly to it, instead pass the iterator. Fixes pypy support. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06bb.event: handle __builtins__ as a moduleChristopher Larson
Fixes pypy support. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06bb.build: handle __builtins__ as a moduleChristopher Larson
Fixes pypy support. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06bitbake: fetch2: Safer check for BB_ORIGENV datastoreLeonardo Sandoval
BB_ORIGENV value on the datastore can be NoneType thus raising an AttributeError exception when calling the getVar method. To avoid this, a check is done before accesing it. [YOCTO #9567] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29toaster: bin/toaster Fix noweb commandMichael Wood
For the noweb command we don't need to check if a socket is in use or not as we're not starting the django development server. We're just setting up the environment and running the runbuilds scheduler. 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>
2016-04-29toaster: bin/toaster Add ability to specify port and address to bind toMichael Wood
Allow binding to a specified address and port to start the django development server on. Remove the assumption that you want to bind to 0.0.0.0 and set the default to localhost. Add some additional help text after Toaster webserver has started 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>
2016-04-29toaster: bin/toaster Add help text for unrecognised commandMichael Wood
Add help text for unrecognised or missing command for toaster script Remove assumption that no command is 'start' as the default. 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>
2016-04-29bitake: main: fix line-too-long pytling warningsEd Bartosh
Wrapped long lines to fix "Line too long" pylint warnings. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29bitbake: main: fix bad-continuation warningsEd Bartosh
Fixed pylint warning 'Wrong continued indentation'. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29bitbake: main: fix bad-witespace pylint warningsEd Bartosh
Fixed pylint warnings: No space allowed around keyword argument assignment No space allowed after bracket No space allowed before bracket Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29bitbake: main: set defaults from env variablesEd Bartosh
Environment variables BBSERVER, BBTOKEN and BBEVENTLOG silently overwrite bitbake command line arguments. This is confusing and can cause issues that are difficult to debug. It's better to use them as default values instead. Used environment variables BBSERVER, BBTOKEN and BBEVENTLOG to set default values for command line arguments. Changed setting default value of --ui command line argument from BITBAKE_UI to look similar way. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29bitbake: main: add 2 environment variablesEd Bartosh
Bitbake uses set of environment variables to set command line options, e.g. seeting BBTOKEN variable has the same effect as using --token command line option. Added new environment variables BBPRECONF and BBPOSTCONF that are equivalents of --read and --postread command line options. They can be used by high level scripts to append or prepend configuration files to conf/local.conf [YOCTO #9235] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29toaster: customrecipe Only show download icon or button if it's possibleMichael Wood
If the based on recipe has not yet been checked out/cloned we cannot generate the custom image recipe file that uses it. So disable/remove the option to download it. [YOCTO #9425] 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>
2016-04-29toaster: orm Add get_base_recipe_file to CustomImageRecipeMichael Wood
This function returns the base recipe file path only if it currently exists. This allows us to know whether we can proceed at this point with generating a custom image recipe. It also enables us to call this function from the templates to enable visual indication of this state. Some whitespace fixes also added in generate_recipe_file_contents 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>
2016-04-29bitbake: Switch to post release versionRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-26fetch2: export DBUS_SESSION_BUS_ADDRESS to support authentication agentsRoss Burton
Some users may want to use authenticated SSH connections with credentials stored in a keyring, such as gnome-keyring. These typically need a DBus session bus connection, so pass DBUS_SESSION_BUS_ADDRESS into the fetcher environment. To avoid the user needing to set it in their local.conf (which wouldn't be usable) or adding it to the environment-cleansing whitelist (which would potentially impact builds) allow the variables being passed to the fetchers to come from the data store (first) or the original environment (second). Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-19toaster-tests: tests for build dashboardElliot Smith
Convert existing tests to Selenium. Add basic tests to check that the modal contains radio buttons to select a custom image to edit when a build built multiple custom images, and to create a new custom image from one of the images built during the build. [YOCTO #9123] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-19toaster: add modal to select custom image for editingElliot Smith
Add functionality to the placeholder button on the build dashboard to open a modal dialog displaying editable custom images, in cases where multiple custom images were built by the build. Where there is only one editable custom image, go direct to its edit page. The images shown in the modal are custom recipes for the project which were built during the build shown in the dashboard. This also affects the new custom image dialog, as that also has to show custom image recipes as well as image recipes built during the build. Modify the API on the Build object to support both. Also modify and rename the queryset_to_list template filter so that it can deal with lists as well as querysets, as the new custom image modal has to show a list of image recipes which is an amalgam of two querysets. [YOCTO #9123] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-19toaster: add build dashboard buttons to edit/create custom imagesElliot Smith
When a build is viewed in the dashboard, enable users to edit a custom image which was built during that build, and/or create a new custom image based on one of the image recipes built during the build. Add methods to the Build model to enable querying for the set of image recipes built during a build. Add buttons to the dashboard, with the "Edit custom image" button opening a basic modal for now. The "New custom image" button opens the existing new custom image modal, but is modified to show a list of images available as a base for a new custom image. Add a new function to the new custom image modal's script which enables multiple potential custom images to be shown as radio buttons in the dialog (if there is more than 1). Modify existing code to use this new function. Add a template filter which allows the queryset of recipes for a build to be available to client-side scripts, and from there be used to populate the new custom image modal. [YOCTO #9123] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-19toaster-tests: make helper click on input before entering textElliot Smith
The Selenium helper's enter_text() method doesn't cause keyup events to trigger unless the element where text is being entered has been clicked. Prefix all text entry with a click() on the element to ensure that keyup events fire. Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-19toaster-tests: add tests for new custom image pageElliot Smith
Test adding a new custom image when: 1. No custom images are in the project yet. 2. User tries to add custom image which duplicates the name of an existing custom image. 3. User tries to add custom image which duplicates the name of a non-image recipe. [YOCTO #9209] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-19toaster: prevent exception when Project.release is nullElliot Smith
Project.release can be null. This causes an exception when calling get_all_compatible_layer_versions(), as the query to fetch the layer versions references release.branch_name. Add a guard to the function so that an empty queryset is returned if the release isn't set for a project. Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-19toaster: only prevent duplicate custom image names within a projectElliot Smith
We currently prevent the same name being used for multiple custom images, but make the check across all projects. This means that custom image names have to be unique across all projects in the Toaster installation. Modify how we validate the name of a custom image so that we only prevent duplication of custom image names within a project, while ensuring that the name of a custom image doesn't duplicate the name of a recipe which is not a custom image recipe. [YOCTO #9209] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-19toaster: disable/enable "Add layer" button according to input's contentElliot Smith
In the import layer page, the "Add layer" button in the layer dependencies section doesn't accurately reflect whether the layer name in the corresponding input can be added. A partial or empty layer name can leave the button active, such that when it is clicked, a previously-selected layer can be accidentally added. Fix by keeping track of the items currently available in the typeahead, only activating the "Add layer" button when the input matches the name of one of those items. [YOCTO #8511] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-19toaster: fix sorting after hiding a column in build tablesElliot Smith
When hiding a column in the build tasks or build packages included table, if the column is set as the current order by for the table, the order by is not reset to the default. The result is that the table stays sorted by the hidden column. Set the default_orderby for these two tables correctly to ensure the corresponding table is re-sorted when a column is hidden, if that column was being used as the order by. [YOCTO #9011] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-19toaster: ensure ToasterTable headings are reset when order by changesMichael Wood
If a ToasterTable is ordered by an optional column and that column is subsequently hidden, the table ordering switches back to the default ordering for the table. However, the table headings don't update to reflect the new ordering. This is because the code which sets the heading weight and hides/shows the caret symbols only runs when the table is first loaded. Store the default order by and re-apply it when the data is updated. [YOCTO #9011] 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>
2016-04-19main: fix processing of BBEVENTLOGEd Bartosh
Fixed typo that caused incorrect processing of BBEVENTLOG environment variable. Even if variable is set it was ignored by bitbake. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-18lib/bb/utils: add docstring for contains()Ross Burton
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-18bitbake-user-manual: Updated the 'bitbake -h' output example.Scott Rifenbark
Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-18bitbake-user-manual: Updated "Conditional Metadata" sectionScott Rifenbark
Added information about using lower-case characters and no underscore characters when using OVERRIDES. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-14bitbake-user-manual: Updated discussion about using "inherit"Scott Rifenbark
Fixes [YOCTO #9343] I updated the inherit directive section to note that you can inherit multiple classes using a single line. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-14providers: Add PREFERRED_RPROVIDER supportRichard Purdie
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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-14providers: We don't depend on previous build resultsRichard Purdie
Back in history the code did depend on previous build results. This was bad for determinism and we no longer do that. Update comments to match the current behaviour. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-14cooker/knotty: Prefix parse logs with filename being parsedRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-14cooker: pass exception to finishAsyncCommandRichard Purdie
An invalid task causes bitbake to exit incorrectly, firing a CommandCompleted event rather than a CommandFailed one. This means that clients listening for CommandFailed events are unable to detect the build failure even though one occurred. Passing an exception string to finishAsyncCommand when a task fails causes the CommandFailed event to be fired correctly. [YOCTO #9087] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-12runqueue: Improve 'mulitiple .bb files are due to be built' messageRichard Purdie
When multiple recipes which both provide something are being built, bitbake informs us that most likely one of them provides something the other doesn't, which is usually correct, but unfortunately it's rather painful to figure out exactly what that is. This patch dumps two sets of information, one is the provides information for each recipe, filtered so only common components are removed. The other is a list of dependees on the recipe, since sometimes this can easily identify why something is being built. Its not straightforward for bitbake to obtain the information but since the warning/error code path isn't the normal one, we can afford to go through some less than optimal processing to aid debugging. Also provide the same information even if we're showing a warning since its still useful. [YOCTO #8032] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09toaster: fixes for customimage package not foundDave Lerner
For a custom image, if a search for a package results in no packages found, then additional information should be presented to the user. This is different than a 'no results' found for a search in other contexts, for example, a search for a package in a non-customised build. For a custom image, a package search failure can happen because the package was not added to the custom image. This commit presents more information to the user, suggesting why the package was not found in the custom image. The generic table view handling js changes to handle a new div element no-results-special-... such that, if present, that template section is shown rather than the default no-results-... section. [YOCTO #9154] Signed-off-by: Dave Lerner <dave.lerner@windriver.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09data_smart: Restrict expansion regexp to not include : charactersRichard Purdie
Bitbake variables don't include ":" characters so exclude these from the variable expansion regexp. This assists when parsing shell code which does A=${B:-C} as we don't want a dependency on a variable called "B:-C". Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09tests/utils.py: test origvalue in a callback matches what is expectedRandy Witt
There were no tests that verified the value of origvalue in the callback routines used by edit_metadata(). This patch adds one for a simple multiline variable. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-09lib/bb/utils.py: Fix a bug in edit_metadata() that could corrupt varsRandy Witt
edit_metadata() would corrupt a variable that was multiline, but had the ending quotes on the same line as the last value. For example: TEST_VAR = " foo \ bar" would become " foo ba" because the code would always delete the last character on the line and then do it again if the line ended in the quote. This however doesn't show up if you have: TEST_VAR = " foo \ bar \ " which is how all the test cases were written. This patch fixes that bug and adds and fixes a test that matched the bugs behavior rather than the expected behavior. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06Update version to 1.30.0Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>