summaryrefslogtreecommitdiffstats
path: root/bitbake
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: toaster: run bitbake server with --read optionEd Bartosh2016-01-221-1/+1
| | | | | | | | | | | | | | | Toaster script run bitbake with --postread conf/toaster.conf. It turned out that variables set this way don't influence the build. Changing --postread to --read makes bitbake to read variables earlier and should fix this issue. [YOCTO #8781] (Bitbake rev: 76c9871740ef42ac35fdfdcb89a68478cca370cd) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: taskdata: add the ability to access world targets listPaul Eggleton2016-01-224-24/+48
| | | | | | | | | | | | | | | | | | | | | In certain circumstances it can be useful to get access to the world targets list from a recipe in order to add dependencies on some or all of the items in it. If a special function, 'calculate_extra_depends' is defined in the recipe, and the recipe is to be built, then call it at the right point before we calculate which tasks should be run. The function can append items to the "deps" list in order to add dependencies. This is not as tidy a solution as I would have liked, but it does at least do the job. As part of this change, the buildWorldTargets function was moved to bb.providers to make it possible to call from taskdata. Part of the implementation of [YOCTO #8600]. (Bitbake rev: aba0dce57c889495ec5c13919991a060aeff65d2) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cache.py: check existence before add to cachedata.rprovidersRobert Yang2016-01-221-1/+2
| | | | | | | | | | | The rprovides maybe contain duplicated lines when parse again, we need check it before add to cachedata.rproviders, similar to what we had done to cachedata.providers. (Bitbake rev: 6c488afb0fe30a9655ec62a1d22f9f388365f012) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: taskdata.py: add RuntimeProviders to close matchesRobert Yang2016-01-221-1/+8
| | | | | | | | | | | | | | | This is useful for newbie, for example: $ bitbake rpm-build ERROR: Nothing PROVIDES 'rpm-build'. Close matches: pm-utils rpm RPROVIDES rpm-build [YOCTO #8881] (Bitbake rev: 4b59eb8cc2321fe72f2988b6c9c0fecd4883255b) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data_smart: Don't show exceptions for EOL literalsRichard Purdie2016-01-222-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If variables are unset, the code simply doesn't expand them, there aren't errors. If the code is a python expression, this can get a bit messy, see the attached test case. The python expansion code sees the } of the unexpanded value rather than the close of the python expression and then raises a SyntaxError exception. Ideally, we'd update the code to match pairs of brackets. I don't know how to do that with the current regex and this is unfortunately a performance sensitive piece of code. We also run the risk of breaking existing code in OE-Core where there are "{" characters but not "}" to close them (PKGE and PE). Rather than raising the exception, matching the existing "just return the expression" behaviour seems more consistent with the standard variable behaviour. This addresses an issue found in the recent image.bbclass code where there are some variables we choose not to expand (TMPDIR/DATETIME). This patch also adds a test case for this behaviour. It wouldn't preclude improved bracket matching code in the future either. (Bitbake rev: d80d39e73223a50fda0090784303d2c57167bb4c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: tests/codeparser.py: Add filename/lineno flags to test variableOlof Johansson2016-01-191-1/+6
| | | | | | | | | | | | | | | | | A recent change in bitbake added filename/lineno information to the parameters of bb.data.build_dependencies(). The codeparser tests required a little adaption to the changes, adding the flags to the FOO variable used in the tests. The error seen when running the tests is a TypeError exception raised in bb.codeparser: TypeError: int() argument must be a string or a number, not 'NoneType' (Bitbake rev: f1fe674397ac5cd355696d5b4cc90b7cfa6c867f) Signed-off-by: Olof Johansson <olof.johansson@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: write variables to toaster.confEd Bartosh2016-01-191-0/+7
| | | | | | | | | | | | | | | With the resent change in rootfs creation code setVariable rpc calls don't set variables for bitbake workers anymore. Writen variables to toaster.conf should solve this issue. [YOCTO #8910] (Bitbake rev: d6dfe40320ff6ca420d9f9016b4d1d83d10f1d59) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Revert "runqueue.py: Ensure one setscene function doesn't mask out ↵Richard Purdie2016-01-191-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | another which needs to run" This reverts commit b22592af8145a8c7c4ada2fa7c1dee2e753eca46. That commit isn't entirely clear about why this change is needed but I do have a usecase where this breaks things. If for example you run "bitbake X -c packagedata" and that packagedata is in sstate, you'd expect this to work. If sstate doesn't contain a do_populate_sysroot for a dependency, you would still expect the command above to succeed and you would not expect it to rebuild that dependency. With the current code, this isn't what happens. The code finds the sstate for do_populate_sysroot missing, this makes the task "uncovered" and this in turn makes it unskippable. The example I found with this was avahi-ui, where it would trigger a build of libdaemon to obtain its populate_sysroot. Since this behaviour seems completely incorrect, revert the older patch and we'll address any issues that crop up as a result. (Bitbake rev: 36a9840a5da17cc14561881fdd6a4f2cb0a75e49) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: make artifact download more robustElliot Smith2016-01-182-63/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When an artifact download is requested, Toaster goes through a convoluted series of conditions to decide which file to push to the response. In the case of build artifact downloads for command line builds, this caused an ugly exception, as command line builds don't have a build request. To simplify and catch more corner cases, remove the code which fetches files via the build environment (we only support the local build environment anyway). Then push all requests along a single path, catching any missing file errors, missing object errors or poorly-formed URLs in a single except clause which always returns a valid response. Also modify the text on the "unavailable artifact" page so it says that the artifact doesn't exist, rather than it "no longer" exists (exceptions may occur because an invalid artifact was requested, rather than an artifact which was removed). [YOCTO #7603] (Bitbake rev: 24e20db55c2933de5e58ca754b8fd5b624f47820) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: log OSErrorException metadata eventsElliot Smith2016-01-181-0/+2
| | | | | | | | | | | | | | | | OSErrors occurring in toaster.bbclass are converted to OSErrorException metadata events. They were then being swallowed as unprocessed events by toasterui, which made them difficult to spot. Explicitly catch OSErrorException events and log them so they are easier to spot and debug. (Bitbake rev: 69f2b2bc373ce114609600b59a6b6ccef20771c9) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: listen for bb.event.MetadataEventElliot Smith2016-01-181-1/+2
| | | | | | | | | | | | | | | | | | The event mask for toasterui doesn't include MetadataEvents. This means that we're missing the ArtifactFileSize event (among others), which is the one we use to populate the SDK artifact table. Add that event type to the toasterui event mask so we can record SDK artifacts as they are created. [YOCTO #7603] (Bitbake rev: d0276a831bb8cffd42c8367895633eaa1fa1ed30) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: increase timeoutEd Bartosh2016-01-161-1/+1
| | | | | | | | | | | | | | | | | | Sometimes Toaster connection to the bitbake server fails with this error in the log: ERROR: Could not connect to server 0.0.0.0:46572 : Could not register UI event handler It happens more often on slow machines. Increasing timeout after restarting bitbake should fix this issue. [YOCTO #8776] (Bitbake rev: b64a0adc1efd72aa4d46df3e043dd14543abae3d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: code formatting and clean-upElliot Smith2016-01-153-13/+8
| | | | | | | | | | | Minor fixes to code formatting and small improvements from code review. (Bitbake rev: 2c97f3a5c6ae37de910deb90390c5b856a600c5f) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster tests: fix Django tests for new ToasterTable pagesElliot Smith2016-01-151-85/+180
| | | | | | | | | | | | | | | | | The Django command-line tests can no longer test the content of the projects/, builds/ and projectbuilds/ pages, as ToasterTable pages are populated by JavaScript. Fix/remove affected tests by converting them to tests on the JSON returned by the ToasterTable. [YOCTO #8738] (Bitbake rev: 85efa9530fa6181855e051bfd14de1c15db9c3b7) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: remove unused views and template codeElliot Smith2016-01-153-647/+0
| | | | | | | | | | | | | | | | The code in views.py for setting up the template context for old non-ToasterTable views is no longer necessary, as this is now implemented in tables.py. The template files for these views have also been removed. [YOCTO #8738] (Bitbake rev: 2b5a13afb068c85466436914d8d4ac3b31bc5c02) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: fix error and warning counts for buildsElliot Smith2016-01-1510-702/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error and warning counts displayed for builds were counts of the errors and warnings objects associated with a build. Because these values were being derived on the fly, it was not possible to sort by them. Previously, the 3rd party django-aggregate-if library was used to add aggregate fields to Build objects and should then have been used to populate the "all builds" and "project builds" tables. However, at some point the templates had changed so that the error and warning counts were coming from the properties on the Build model and not from these aggregates. This meant that it was not possible to sort by these fields. Django 1.8 supports conditional aggregates in annotation fields on querysets. This means we can remove django-aggregate-if, use the new Django 1.8 feature to derive errors_no and warnings_no fields as annotations, then use those annotation fields in the templates. This makes the "builds" tables sortable again. [YOCTO #8738] (Bitbake rev: 9be7c5c18b325f6ed40bc431ac408db242007eb1) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: make "Apply" button state depend on filter rangeElliot Smith2016-01-152-22/+59
| | | | | | | | | | | | | | | | | | | | | | | If a range filter action had an empty from/to field, the range filter could still be applied. This was confusing, as an invalid filter range caused all records to display, even though a filter appeared to have been applied (by the highlighted state of the filter button). Change the state of the "Apply" button, disabling it if the radio button for a range filter action is selected but the range is incomplete (from or to field is empty). When a non-range filter is selected, the "Apply" button always enable the "Apply" button. [YOCTO #8738] (Bitbake rev: 168184b28165d7aa354b9092b5986f91c58d550d) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: mute label for filter actions with no recordsElliot Smith2016-01-151-2/+5
| | | | | | | | | | | | | | | | | | The radio button for a filter action is disabled if that filter action has no associated records. However, the label retains the normal font styling, so it's unclear that the action is not available. Add the "muted" class to the label for a filter action (and still disable its radio button) if it has no records associated with it. [YOCTO #8738] (Bitbake rev: b7f7ff095c9c4c922e608f776713f17acc1f150d) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: set default visible and hideable columnsElliot Smith2016-01-152-3/+38
| | | | | | | | | | | | | | | | | | | | | | | Incorrect columns were shown by default in the "all builds", "project builds" and "all projects" pages. Set the "hidden" property on columns in these tables to hide the correct columns. Add a set_column_hidden() method to ToasterTable so that the "hidden" property can be overridden for the machines column in the project builds page (it shares a superclass with all builds). Make the time column on all builds page hideable. [YOCTO #8738] (Bitbake rev: be3982c71703eaa51e7f3352e0cb5b3af11c9ead) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: serialise decimals correctlyElliot Smith2016-01-151-0/+3
| | | | | | | | | | | | | | | | The conversion of some ToasterTable Build object querysets to JSON caused a serialisation error. This is because one of the fields in the queryset was of type decimal.Decimal, and our serialiser didn't know what to do with it. Add a clause to check for decimal fields and serialise them so that correct JSON can be generated. (Bitbake rev: fa6229d4edf5904ccaa9dc323d0ab2318d1ef314) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: streamline construction of filter objectsElliot Smith2016-01-154-66/+32
| | | | | | | | | | | | | | In line with comments from review, remove the QuerysetFilter class (redundant) and convert ProjectFilters into a class with static methods. [YOCTO #8738] (Bitbake rev: 59379bf6467029223045c5ebef868729d8e02c86) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: ensure filter_value updatesElliot Smith2016-01-151-14/+18
| | | | | | | | | | | | | | | | | | | | | Clicking on the radio button for a date range filter action populates the from and to fields for that action if they are empty. However, because this doesn't fire "change" events, clicking on the radio button doesn't update the filter_value hidden field. This means that the date range action's filter_value parameter isn't set correctly when the filter popup is submitted. Manually call the changeHandler() to set the filter_value whenever the radio for a date range filter is clicked. [YOCTO #8738] (Bitbake rev: 1a3038cf8d9b32532f1fe92cd3472b4473ffc0c4) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: don't hide all elements with .col classElliot Smith2016-01-151-4/+4
| | | | | | | | | | | | | | | | | | | | Disabling the "project" column in a ToasterTable for builds causes the recent builds area to be hidden. This is because the column hiding code hides all elements with a class matching ".<column>", regardless of where they occur on the page; and the recent builds area was using the ".project-name" class, which means it is included in the set of elements which are hidden. Scope the element search to the table so that only elements within the table are hidden or shown. [YOCTO #8792] (Bitbake rev: 151bc20daf51e0ab8baf11ea29244b7fec1f8a22) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: convert project builds page to ToasterTableElliot Smith2016-01-159-49/+239
| | | | | | | | | | | | | Use the all builds ToasterTable as the basis for the project builds ToasterTable. [YOCTO #8738] (Bitbake rev: 87bcfb740dd2d9944e35a2a1f71cbf8ff3b266e9) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: implement "today" and "yesterday" filtersElliot Smith2016-01-156-84/+212
| | | | | | | | | | | | | | | | | | | | | | | | | Add the "today" and "yesterday" filters to the started_on and completed_on columns in the builds table. During this work, some minor adjustments were made to the behaviour of the builds table: * Amend filter action variable names so they're more succinct. * Retain order in which actions are added to a filter, as this ordering is used in the UI when displaying the filter actions. * Always show the table chrome, otherwise it's not possible to edit the columns shown until there are 10 or more results. * Because date range searches may return no results, make sure that the search bar and "show all results" link are visible when the query returns no results. [YOCTO #8738] (Bitbake rev: f17cfa009e58833e0e55884fa04de8abd522b6bc) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: implement date range filters for buildsElliot Smith2016-01-156-84/+330
| | | | | | | | | | | | | | | | | | | Implement the completed_on and started_on filtering for builds. Also separate the name of a filter ("filter" in the querystring) from its value ("filter_value" in the querystring). This enables filtering to be defined in the querystring more intuitively, and also makes it easier to add other types of filter (e.g. by day). [YOCTO #8738] (Bitbake rev: d47c32e88c2d4a423f4d94d49759e557f425a539) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: show recent builds on all builds pageElliot Smith2016-01-153-7/+23
| | | | | | | | | | | | | | | | The recent builds section was disabled while converting the all builds page to ToasterTable. Re-enable the recent builds area and add the data it requires to the ToasterTable context. [YOCTO #8738] (Bitbake rev: d6df4545bd134a23c9bd3cd1ba3b61ddb26545e4) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: switch off filter highlights when inactiveElliot Smith2016-01-151-1/+7
| | | | | | | | | | | | | | | | | | | | | In ToasterTables with multiple columns which allow filtering (e.g. all builds), selecting one filter, then a second filter (e.g. selecting "failed builds" then "outcome" for all builds), would result in both filters being highlighted at the same time. Fix this by removing the "active" highlight on all column filter buttons when a new filter value is submitted (via the filter modal). NB to enable this, added a data-filter-on attribute to all column filter buttons to make them easy to select. [YOCTO #8738] (Bitbake rev: 7347ad0d4baace593751b44a86ab8e11a04a02b6) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: refactor ToasterTable filteringElliot Smith2016-01-155-118/+310
| | | | | | | | | | | | | | | | | The filter code for ToasterTable was difficult to follow and inflexible (not allowing different types of filter, for example). Refactor to a set of filter classes to make the structure cleaner and provide the flexibility needed for other filter types (e.g. date range filter). [YOCTO #8738] (Bitbake rev: 94031bb30bdaf665d0c8c68b591fcb7a17b6674d) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: convert all builds page to ToasterTableElliot Smith2016-01-157-80/+434
| | | | | | | | | | | | | | | | For better long-term maintainability, use ToasterTable instead of Django template and view code to display the all builds page. NB the builds.html template has been left in, as this will otherwise cause conflicts when merging the new theme. [YOCTO #8738] (Bitbake rev: e0590fc8103afeb4c5e613a826057555c8193d59) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: use event delegates for hover help elementsElliot Smith2016-01-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | libtoaster.js binds to hover help elements via their hover() and mouseout() methods. However, any elements added to the DOM after libtoaster has initialised will not have these bindings added. This causes a problem for ToasterTables which have hover-help elements (e.g. the builds/ table). Use the on() method instead. This uses event delegation to bind a handler to any th or td elements already in the DOM, or which will be added to the DOM in future. ToasterTables can now reconstruct the table DOM and still have the correct handlers attached once the table is done. [YOCTO #8738] (Bitbake rev: 1f3ff01fed0b4de8721191f108033ad044cdc26a) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: switch projects/ view to ToasterTableElliot Smith2016-01-153-12/+23
| | | | | | | | | | | | | | | | | | | | | Remove the old projects page and replace with the new ToasterTable-based version. NB although the projects.html template is no longer required, it's been left in as there will be changes applied to it for the new theme. These changes will have to then be transferred from the projects.html template to projects-toastertable.html. Similarly, the code for the projects page in views.py has been retained. [YOCTO #8738] (Bitbake rev: ebe7831ef65e78a9d100f29a63311518577fc838) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: check inferred file suffixes against list of known typesElliot Smith2016-01-153-41/+73
| | | | | | | | | | | | | | | | | | | | | | | | The algorithm for finding the suffix for image files produced by the build doesn't reference a list of known file suffixes, so could be prone to error. Modify how file suffixes are parsed from the file path so that they are compared against a list of known types; if this fails, use the part of the basename of the file path after the first '.' character. Also rationalise the places in the views code where we extract the file name extensions for builds, so they both use the same algorithm (before, the same code was duplicated in two places). [YOCTO #8417] (Bitbake rev: dd1c509696b8ab5e593cc64637060a58e95fcd1f) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: move image file suffix list to modelElliot Smith2016-01-152-6/+10
| | | | | | | | | | | | | | | | | | | | | Image file suffixes are used in the project configuration page to show a list of available image file types. This list is stored as a function in the views code. However, this list is also needed when parsing image file paths, so that the suffixes can be shown in the "all builds" and "project builds" tables. Move the list of valid image file suffixes to the Target_Image_File class to make is accessible in other places where it may be needed. [YOCTO #8738] (Bitbake rev: c2f20232077917552623fd0726d0820e50b04cae) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toastergui: use ToasterTable for projects pageElliot Smith2016-01-153-3/+265
| | | | | | | | | | | | | | | | | | | The projects page uses the old approach for showing tables, which means a template for each table. This means that applying changes to ToasterTable (which is used for most tables) has no effect on the layout, styling and behaviour for these older tables, and requires additional duplicated effort. Move the projects page to use ToasterTable instead, to remove the duplication of effort. [YOCTO #8738] (Bitbake rev: df56a35bc71639457329c4b58839976c5ee40106) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Revert "fetch/git: Change to use clearer ssh url syntax for broken ↵Richard Purdie2016-01-151-4/+0
| | | | | | | | | | | servers" This reverts commit 4193e99adce8e88f12ac88d7578ad39575f7e346. It seems the underlying issue was caused by ":" in the url which isn't supported. The patch was therefore incorrect. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Revert "fetch2/local.py: avoid using PREMIRROR"Richard Purdie2016-01-131-5/+0
| | | | | | | | | | | This reverts commit e130dca85bac82bd4d88f94a6bf9fe36e8ad4d7c. This is in fact a valid use case, for example the sstate.bbclass code sets up SSTATE_MIRRORS as PREMIRRORS. Its quite common to map those file:// urls to remote http:// urls and with the above change, this no longer works. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2/git.py: Add missing "errno" module import.Kristian Amlie2016-01-111-0/+1
| | | | | | | | | | | | This goes undetected most of the time, but when updating a repository, if the ud.fullmirror file is not present, you end up getting an exception instead of carrying on because the errno module is not loaded (specifically "if exc.errno != errno.ENOENT"). (Bitbake rev: e6fca8480731ce817df9bee61438347a5e3d3017) Signed-off-by: Kristian Amlie <kristian.amlie@mender.io> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: clean up stamp-base related codesChen Qi2016-01-112-10/+4
| | | | | | | | | | | | The 'stamp-base' and 'stamp-base-clean' related codes are no longer useful, clean them up. [YOCTO #8468] (Bitbake rev: 7b4c42b315d4a26dd8f2ceb874a94737bf9f183e) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: runqueue: Fix setscene task dependenciesRichard Purdie2016-01-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Debugging suggests that setscene tasks are being a little greedy about their dependencies, for example, lsof is insisting that gcc-runtime's do_package is installed. If it isn't, its requiring gcc to rebuild. If gcc-runtime do_package_write_xxx and do_packagedata is available, there is no reason do_package should be needed. The reason this is happening appears to be from the batching up of task dependencies code, rather than setscene tasks stopping when passing over a setscene task, they were being carried forward. This patch fixes it so the data is 'zeroed' when passing over a setscene task boundary, which gives the dependency graph that is expected. After this patch, lsof will rebuild quite happily without gcc-runtime:do_package being present, as expected. This should lead to less dependencies being installed for builds from sstate and generally better performance in general. (Bitbake rev: f8bcb0a1e3b008b71c9a7cd21f76d0906f2d8068) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: settings Add uid to the toaster cache dirMichael Wood2016-01-111-1/+1
| | | | | | | | | | | | | | Make the default toaster cache dir unique to the user running toaster. If we have multiple users running toaster we previously got a permission denied exception on saving a cache file. [YOCTO #8782] (Bitbake rev: 5207abdf58019271bf92bff4bcce3911b8691508) 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: show 'satisfied via' text for reverse depsEd Bartosh2016-01-111-1/+8
| | | | | | | | | | | | | | Showed '<dependency> satisfied via <provider>' text and help tooltip for the reverse build dependencies provided through 'PROVIDES' in the 'Reverse build dependencies' tab. [YOCTO #6169] (Bitbake rev: c7bb98e2e2111790ded86087b13c8b49462d6b75) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: show 'satisfied via' text for build depsEd Bartosh2016-01-111-1/+8
| | | | | | | | | | | | | | Showed '<dependency> satisfied via <provider>' text and help tooltip for the build dependencies provided through 'PROVIDES' in the 'Build dependencies' tab. [YOCTO #6169] (Bitbake rev: de77e338fe70341fe98561e2e40b534f5c88db10) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: show list of provides for the recipeEd Bartosh2016-01-111-0/+10
| | | | | | | | | | Showed list of names that recipe provides. (Bitbake rev: 60318c9a049292bd33322d8446a629d778337e8a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: add provides info to the dbEd Bartosh2016-01-111-3/+8
| | | | | | | | | | | | | | | | Added new entries to Provides model and link them to Recipe_Dependency using 'via' field. This data will be used by Toaster UI to show 'Provides:' information for the recipes. [YOCTO #6169] (Bitbake rev: 336ddc8df611d4c8f1c3d3a06d0a85bb544c38bc) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: add Provider modelEd Bartosh2016-01-112-0/+32
| | | | | | | | | | | | | Added new model Provider and a foreign key 'via' to link Recipe_Dependency to it. [YOCTO #6169] (Bitbake rev: e45fff6314741d46e2549b2f72ed380cbbb95593) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: buildinfohelper: use providermapEd Bartosh2016-01-111-8/+16
| | | | | | | | | | | | | | Used providermap in store_dependency_information function to find virtual dependencies. This should fix annoying warnings "stpd: KeyError saving recipe dependency" [YOCTO #6169] (Bitbake rev: 85c416ca338c886db6e79651e44727482df9fb07) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker: add providermap to dep_treeEd Bartosh2016-01-111-0/+7
| | | | | | | | | | | | Added providermap information to the result of buildDependTree API. This will be used by Toaster to map virtual dependencies to recipes. (Bitbake rev: d3e07368549f30265f59846a260efa8230a225ca) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: taskdata: refactor get_providermapEd Bartosh2016-01-112-11/+8
| | | | | | | | | | | | | | | Added optional parameter 'prefix' to filter out names that don't start with specified prefix. Changed existing call of get_providermap according to changed API. Optimized the code: got rid of extra loop and temporary list variable virts. (Bitbake rev: df5a1392d6f91ccb44a99721c7d847da242121bb) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: main/runqueue: Add --setscene-only option to bitbakeRichard Purdie2016-01-113-3/+10
| | | | | | | | | | | | | Its turning out that we really need a way to have bitbake just run the setscene tasks but not any real tasks, particularly for SDK operations. Add an option for this since its pretty straight forward. This allows various nasty workarounds in OE-Core to be removed. (Bitbake rev: e4a2aafa1650a227a04d92a8a0b31efaed2c310e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>