summaryrefslogtreecommitdiffstats
path: root/bitbake
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: lib/bb/tests/fetch: remove URL that doesn't exist anymoreRoss Burton2016-09-131-1/+0
| | | | | | | | | | The CUPS ipptool URL we were checking now redirects to github where the tarball isn't present, so remove it from the test suite. (Bitbake rev: e64564bcaa7331f505baa5209fef1f50dfda1469) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Fix adding of bitbake variables containing ':'Alexander Egorenkov2016-08-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | This fix is a backport from toaster-next. Krogoth Toaster is unable to add a variable containing ':' and fails with the following error message: error on request: too many values to unpack Traceback (most recent call last): File "bitbake/lib/toaster/toastergui/views.py", line 2171, in xhr_configvaredit variable, value = t.spli(":") ValueError: too many values to unpack. [YOCTO #10170] (Bitbake rev: bee144eeed6c08ec2829533e82f94405058ce453) Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@vector.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Safer check for BB_ORIGENV datastoreLeonardo Sandoval2016-06-291-1/+2
| | | | | | | | | | | | | | | | | 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] (Bitbake rev: f368f5ae64a1681873f3d81f3cb8fb38650367b0) (Bitbake rev: 25859009b710cb35ac8f9ee9eb3a7305f9e13402) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: export DBUS_SESSION_BUS_ADDRESS to support authentication ↵Ross Burton2016-06-021-2/+3
| | | | | | | | | | | | | | | | | | | | agents 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). >From bitbake master rev: 20ad1ea87712d042bd5d89ce1957793f7ff71da0 (Bitbake rev: 26379ff2b686313c82af87a3a35b47adbc0183be) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix progress bar in MySQL environmentElliot Smith2016-05-132-2/+3
| | | | | | | | | | | | | | | | | | | | When using MySQL, the project builds info delivered by MySQL differs from that delivered by SQLite: the former returns text values from the enumeration for Build outcomes, while the latter returns the integer value. This causes the progress bar JS to break, as it is expecting outcome strings. Modify the recent_build() method to include an outcomeText property for each Build object, then use this in the conditionals in the progress bar JS. [YOCTO #9498] (Bitbake rev: 9ea7d3ec59c2b09ae60cf0c7f18472355bfb98d7) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster-tests: tests for build dashboardElliot Smith2016-04-192-87/+251
| | | | | | | | | | | | | | | | | 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] (Bitbake rev: c07f65feaba50b13a38635bd8149804c823d446a) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add modal to select custom image for editingElliot Smith2016-04-198-92/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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] (Bitbake rev: 8c2aea3fa8e1071de60390e86e2536904fa9b7c0) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add build dashboard buttons to edit/create custom imagesElliot Smith2016-04-199-96/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] (Bitbake rev: 4c49ffd28e41c4597bdac34d5e54c125571a4b95) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster-tests: make helper click on input before entering textElliot Smith2016-04-191-1/+5
| | | | | | | | | | | | | | | 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. (Bitbake rev: cea34880ad3847bd0e24c9b650eb816e1757cf2b) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster-tests: add tests for new custom image pageElliot Smith2016-04-191-0/+160
| | | | | | | | | | | | | | | | | | 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] (Bitbake rev: 21c1f8f8e30ef868ea6fd861eea1389f149f1049) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: prevent exception when Project.release is nullElliot Smith2016-04-191-5/+11
| | | | | | | | | | | | | | | 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. (Bitbake rev: 6919a2b2e412a9e7b652a6bc191e7c1bed035222) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: only prevent duplicate custom image names within a projectElliot Smith2016-04-192-17/+24
| | | | | | | | | | | | | | | | | | | | 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] (Bitbake rev: 9abbb46e799c06757e03addd54e3f5d3c0fe2886) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: disable/enable "Add layer" button according to input's contentElliot Smith2016-04-192-1/+34
| | | | | | | | | | | | | | | | | | | | 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] (Bitbake rev: dbb4f0282ded361baf9e5a0346e134bece5314b9) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fix sorting after hiding a column in build tablesElliot Smith2016-04-192-26/+26
| | | | | | | | | | | | | | | | | | | 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] (Bitbake rev: b99e1012f0ad1dc82a769df15a232280c8e57b9e) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: ensure ToasterTable headings are reset when order by changesMichael Wood2016-04-191-1/+5
| | | | | | | | | | | | | | | | | | | 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] (Bitbake rev: 820761e664cd2d62cc6c333a0e59580b0c4a034d) 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: main: fix processing of BBEVENTLOGEd Bartosh2016-04-191-1/+1
| | | | | | | | | | | Fixed typo that caused incorrect processing of BBEVENTLOG environment variable. Even if variable is set it was ignored by bitbake. (Bitbake rev: 2705b5f59aef4a070e2df2752d27bd04ea747057) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/utils: add docstring for contains()Ross Burton2016-04-181-1/+19
| | | | | | (Bitbake rev: e9174723ea6d0dff5f7f3042009761cf42284947) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Updated the 'bitbake -h' output example.Scott Rifenbark2016-04-181-3/+9
| | | | | | | (Bitbake rev: 4ca651d32d9e5fbf7f932b4167804905969f4c3a) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Updated "Conditional Metadata" sectionScott Rifenbark2016-04-181-0/+6
| | | | | | | | | | Added information about using lower-case characters and no underscore characters when using OVERRIDES. (Bitbake rev: 4397a023f8bf738913d71a38b3e06503207311e2) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Updated discussion about using "inherit"Scott Rifenbark2016-04-151-0/+10
| | | | | | | | | | | | Fixes [YOCTO #9343] I updated the inherit directive section to note that you can inherit multiple classes using a single line. (Bitbake rev: 3f29ebec593f20894f7a2a0b6d50ee22474aee75) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: providers: Add PREFERRED_RPROVIDER supportRichard Purdie2016-04-152-23/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes you can end up in a situation where you need to specify that a specific runtime entity should be provided by a specific entry. An example of this is bluez where you could end up in a situation where for example: NOTE: multiple providers are available for runtime libasound-module-bluez (bluez4, bluez5) NOTE: consider defining a PREFERRED_PROVIDER entry to match libasound-module-bluez NOTE: multiple providers are available for runtime bluez-hcidump (bluez-hcidump, bluez5) NOTE: consider defining a PREFERRED_PROVIDER entry to match bluez-hcidump The only option here is to set something like PREFERRED_PROVIDER_bluez4 = "bluez4" which is clearly not very informative. I've actually held off adding RPROVIDER support for a long while as this does have sigificant potential for misuse. It doesn't for example allow multiple runtime providers of the same name to coexist, that simply isn't supported. It therefore doesn't replace some of the name mappings such as busybox verses coreutils that OE-Core faces as that is a different problem with different constraints. This mechanism is simply to provide bitbake with a hint to decide what the dependency tree should look like. Also, this allows us to stop printing a confusing message telling the user to set PREFERRED_PROVIDER when the setting needed would be rather ambiguous. [YOCTO #5044] (Bitbake rev: 62eb39d1474d024b204634689071700605c6095c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: providers: We don't depend on previous build resultsRichard Purdie2016-04-151-3/+3
| | | | | | | | | | 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. (Bitbake rev: c3fa7e561c22786d3ac57d04c367aa50f1b3b820) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker/knotty: Prefix parse logs with filename being parsedRichard Purdie2016-04-152-1/+10
| | | | | | | | | | | | | We now prefix log messages coming from worker task context with the PF and task info, however parsing messages all have to be manually prefixed which is ugly and error prone. This change modifies the log handler filter so this happens automatically, meaning we don't have to change every message to include that information. This makes error messages longer but more usable. (Bitbake rev: 1af0ccaac81e182c4ca520037dda362d180e5605) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker: pass exception to finishAsyncCommandRichard Purdie2016-04-151-2/+2
| | | | | | | | | | | | | | | | 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] (Bitbake rev: 98a2c37e077b16e3bc8bb102bd18b293130d15a4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Improve 'mulitiple .bb files are due to be built' messageRichard Purdie2016-04-121-2/+70
| | | | | | | | | | | | | | | | | | | | | | | | | 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] (Bitbake rev: 96fc889b8e62ba4463c71158c4b7286c48d68cd8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: fixes for customimage package not foundDave Lerner2016-04-093-12/+30
| | | | | | | | | | | | | | | | | | | | | | 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] (Bitbake rev: 66b7c7ef61058b52031d71b10effcfe69afbd57b) 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>
* bitbake: data_smart: Restrict expansion regexp to not include : charactersRichard Purdie2016-04-091-1/+1
| | | | | | | | | | | | 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". (Bitbake rev: 14ed41a292123374d94f5c786a619881f2ddea42) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/utils.py: test origvalue in a callback matches what is expectedRandy Witt2016-04-091-0/+22
| | | | | | | | | | | 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. (Bitbake rev: ece3a4d02d8162dee78c2062c10291b5fd625c36) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/utils.py: Fix a bug in edit_metadata() that could corrupt varsRandy Witt2016-04-092-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. (Bitbake rev: 14f05cbdc2ad8d59a94af1c8816567d93c39c88c) Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Update version to 1.30.0Richard Purdie2016-04-062-2/+2
| | | | | | (Bitbake rev: 292bffc8412cd0ddc0c6d16e872c7801e1a67890) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: update LICENSE file with QUnit detailsElliot Smith2016-04-061-0/+2
| | | | | | | | | | QUnit is now included in Toaster's test suite and distributed with its source code. (Bitbake rev: 540c0c8d6aeec5391aa4f76614db6905afabba2c) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests: browser Add test to run the js unit testsMichael Wood2016-04-061-0/+57
| | | | | | | | (Bitbake rev: 81ccbf243050a5a9245d2de4c1de342771c09a59) 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: views jsunittest Add MACHINE and an extra layer to test ↵Michael Wood2016-04-061-4/+14
| | | | | | | | | | | | | | project Add set a MACHINE if needed and add a layer. When we're running in the context of the django unit tests we don't have these defaults setup for the project so add them. (Bitbake rev: a0c1432f32930a17e10d50c08c2aa84a0659514b) 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 Set MACHINE for the test projectsMichael Wood2016-04-061-2/+2
| | | | | | | | (Bitbake rev: 6288a3bd6678ed1c7863cfde6eb33b7c28207777) 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: Add quint to project so that it can be used offlineMichael Wood2016-04-063-2/+350
| | | | | | | | | | | | Currently we're using a hosted version of quint however this means that the testing has to be online or have a cached version of quint. Add the files to Toaster to be able to use offline. (Bitbake rev: fc5024e2ed0e4ec2ee234a42fd0403c70c3f819e) 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: add rev dep column to image detail pagesDave Lerner2016-04-063-0/+27
| | | | | | | | | | | | | | | | | | | | | Add a column to the custom image pages that shows the reverse dependencies in a format matching the dependencies column: - either blank or a button showing the count of reverse dependencies, - when the button is clicked, a popover appears showing the list of reverse dependencies, with each package's size, and the total size of all of the reverse dependencies. The implementation adds a packages table method to retreive the reverse dependency total size, and adds a separate 'popover' html template. Both of these changes follow the pattern for the dependencies column. [YOCTO #9163] (Bitbake rev: 2f978dccaa1ec82c7ad350bdc1cd9500000984eb) 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>
* bitbake: buildinfohelper: work around unicode exceptionsJoshua Lock2016-04-061-4/+6
| | | | | | | | | | | | | | | | | | | We have been seeing UnicodeDecodeErrors when handling the ImagePkgList MetadataEvent in ORMWrapper's save_target_file_information() if the event includes filenames that include non-ASCII characters. In the short term work around this by converting paths to the unicode type when passing them to Django's ORM. This is a bit of a hack but it's too late in the cycle to do anything more invasive. [YOCTO #9142] (Bitbake rev: f50fff03b3de02e73a3cc2eb9935f7c345dbddc4) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: update build in internal stateEd Bartosh2016-04-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | buildinfohelper stores current Build object in its internal state. Any changes to Build object will be lost if internal state is not updated as current buildinfohelper code saves Build object from internal state when build is completed. This bug causes incorrect build state when build is cancelled. Updating internal state should fix it. Note, that this commit updates internal state after status of the build is changed to Build.CANCELLED. There are several other places in the code where Build object is updated without updating internal state. They should be carefully analyzed and fixed. (Bitbake rev: d056cf40fc55530cb1736aedfb9a3c355884991e) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: fix KeyErrorEd Bartosh2016-04-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | When bitbake doesn't need to build anything it still sends ImagePkgList event with empty 'pkgdata', 'imgdata' and 'filedata' fields. This causes crash in buildinfohelper code as it's assumed that above mentioned fields always have data keyed by build target: ERROR: u'core-image-minimal' Traceback (most recent call last): File "toasterui.py", line 423, in main buildinfohelper.store_target_package_data(event) File "buildinfohelper.py", line 1218, in store_target_package_data imgdata = BuildInfoHelper._get_data_from_event(event)['imgdata'][target.target] KeyError: u'core-image-minimal' Fixed this by using dict.get method with empty dictionary as default return value instead of trying to get value without checking if target key is in the data. (Bitbake rev: c39cc463e6d9594bf2c5ac8bb74e834f6f2cf7c8) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: get bitbake location from BBBASEDIREd Bartosh2016-04-061-3/+5
| | | | | | | | | | | | It was incorrectly assumed in the current code that bitbake is in ../bitbake/bin/ directory. It's not always the case. Using bitbake from $BBBASEDIR should be . (Bitbake rev: 6c9e3375d278bee712c41f07428bc82108b9aaae) 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: export BBBASEDIR variableEd Bartosh2016-04-061-1/+2
| | | | | | | | | | | | This variable will be used in localhost controller code to determine correct bitbake location, so it has to be exported. (Bitbake rev: 429d47325aadb74d476e5b7f4738f2dfe26cde95) 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: update projectconf.html for DL_DIR and SSTATE_DIRSujith H2016-04-061-3/+157
| | | | | | | | | | | | | | | | Modified the projectconf.html to include DL_DIR and SSTATE_DIR. Updated the script section in the html to handle the changes made by the user on DL_DIR and SSTATE_DIR. Included validation check for the folder names. [YOCTO #8422] (Bitbake rev: bd9f8973d4c9c0722874a058466b1b911112500e) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: update view to support DL_DIR and SSTATE_DIRSujith H2016-04-061-2/+38
| | | | | | | | | | | | | | | | Update toaster's views.py to support DL_DIR and SSTATE_DIR for page projectconf.html. Removed DL_DIR and SSTATE_DIR from blacklist. Initial value of DL_DIR and SSTATE_DIR comes from BuildEnvironment. [YOCTO #8422] (Bitbake rev: 9f672d7ba503d17175eef37ec03a5779e4c9f792) Signed-off-by: Sujith H <sujith.h@gmail.com> 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 empty tokenEd Bartosh2016-04-061-1/+1
| | | | | | | | | | | | | | | If client xmlrpc token is not provided in the command line, bitbake generates random token. Server token in --server-only mode is always empty. This doesn't allow clients with non-empty tokens to connect to the server. Specifying empty token should stop generation of random token and make it possible for clients to communicate with the server. (Bitbake rev: b54ec2d7cb9f2fb4ff1e8af11b6ecf97d181272c) 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: 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: models Exclude the CANCELLED builds from get_number_of_buildsMichael Wood2016-04-061-1/+4
| | | | | | | | | Don't count CANCELLED builds when returning the number of builds. (Bitbake rev: c3c29fd4eb5116b771e8e16281d4e3cdf4fae165) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: mrb_section template Add build cancel buttonMichael Wood2016-04-062-94/+149
| | | | | | | | | | | | | | Add the cancel build button to the mrb section template and add the event handlers to cancelABuild. Also clean up the calls to startABuild to use the updated libtoaster methods and to make the code consistent with it's cancelABuild counterpart. Co-Author: Sujith H <sujith.h@gmail.com> (Bitbake rev: 6b82ffca1aa9ca2d0feec64b15466bc8ba160011) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: tables BuildsTable exclude cancelled buildsSujith H2016-04-061-2/+3
| | | | | | | | | | | | Exclude cancelled builds from showing in the builds table [YOCTO #6787] (Bitbake rev: a724d6aa7515e712a1d656e46e1d0f3bf7d4cea9) Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: Add handler for cancelling a buildMichael Wood2016-04-061-1/+18
| | | | | | | | | | | When a build is cancelled the build (action) is complete if it has been caused the request being cancelled then update the build outcome accordingly. (Bitbake rev: d94d12914d351bf560b06d6f4e45c294b04ecaa3) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>