Commit Graph

3537 Commits

Author SHA1 Message Date
Michael Wood d6868d5d9d bitbake: toaster: All machines Add filtering based on layer in project
Add a filter so that we can filter machines which are already being provided
by a layer in the current project.
Also make sure that we're only showing layers which are compatible with
the current project.
Also handle no results returned and page heading reflecting the number of
results returned from a search.

AlexD solved conflicts while merging the patch.

(Bitbake rev: b0ae4d2bb71e897d8a846a3cf14b7151baa09bd2)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:50 +00:00
Michael Wood 50719afbc2 bitbake: toaster: All machines Add layer name order by functions
Allow the layer name to be sorted alphabetically in the machines table.
Also fix the default ordering to be machine name

(Bitbake rev: 8fffd7b5fd53bd66ed7621595f57e2cae416e80d)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:50 +00:00
Michael Wood 02b7704052 bitbake: toaster: layerdetails Don't remove alert from dom on dismissal
When dismissing the alert we actually want to keep the alert area still
in the dom for the use of future alerts. The default behaviour is to
remove it from the dom. Hide it again instead.

(Bitbake rev: b3af4f01856c1983f2e77293444e2c3c1b08f879)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:50 +00:00
Michael Wood a1347a150a bitbake: toaster: All machines Update layer notifications
Update layer notifications to the new wording for layer add remove
notifications.
Fix bug where the the alert area is being removed from the dom on
dismiss instead of re-hidden

(Bitbake rev: 2a571a4523dbbe9b6afcf2e6b41edf2cb059729d)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:49 +00:00
Michael Wood 479338cc7b bitbake: toaster: All machines add a column to link back to machine conf
Add a column with the "path" to the machine file and add a link back to
the vcs web to view the machine configuration file.

(Bitbake rev: c1462c0530fe6c34ffef87bcde7a363995b503c9)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:49 +00:00
Michael Wood 87074af8ce bitbake: toaster: machines Make sure we don't overwrite the pagesize
The pagesize was accidentally being over written and should be set to
the value returned from the cookie if there was one.

(Bitbake rev: 2c3b84f5012196c62be3ecf212e9752ee307635c)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:49 +00:00
Michael Wood 8c25c3491b bitbake: toaster: Add add/select functionality to machines page
This feature for the machines page allows the user to add a layer and
it's dependencies to the current project and then if successful select
the machine(s) which become available due to being provided by the
layer.

AlexD merged the changes into the submission queue.

(Bitbake rev: ca4e4ab09ba214363181eeb8ad54ccc716bd65f3)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:49 +00:00
Michael Wood 6969a3d3ea bitbake: toaster: machines Fix undefined variables
pagesize and orderby were undefined causing an error to be thrown when
browsing to the all machines page

(Bitbake rev: 388cfb26695ffd6ac0498e5de571cd4a5e083f8b)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:49 +00:00
Belen Barros Pena b2a903e1ba bitbake: toastergui: add download task log icon to recipe details page
When a task fails, we keep the log and allow users to
download it. Make sure the download is provided in the
tasks table of the recipe details page.

[YOCTO #7207]

(Bitbake rev: 29837409a6cbabafe9e4d102e8143bab5ec22dc2)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:49 +00:00
Belen Barros Pena 6877263f36 bitbake: toastergui: add the word 'compatible' to 'all' pages
Labels for the 'all' pages don't really convey what's provided in them.
The team has suggested we add the word 'compatible' to them,
to make clear they will show all layers / targets / machines that
can be built with the version of the build system you are
using in a certain project. A link like 'view all targets'
becomes 'view all compatible targets'.

I've also added some help text.

(Bitbake rev: 49d85b7035d12a6e482d608e828f69fcafb59d39)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:49 +00:00
Belen Barros Pena 42a7d91ad4 bitbake: toastergui: set column heading to 'Revision'
Replace the column heading 'Branch, tag or commit' with
'Revision'. This also fixes 7023.

[YOCTO #7023]

(Bitbake rev: 102144f8e5069f76e7de8db052c3c4531609771f)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:48 +00:00
Alexandru DAMIAN d81e5141c1 bitbake: toaster: display Toaster mode and version in debug mode
This patch displays the current running mode and checked-out git branch
as Toaster version when running in debug mode.

(Bitbake rev: 93e4f8c44273f4657c5be4c00b61db12aa875e31)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:48 +00:00
Alexandru DAMIAN da8110a86a bitbake: toaster: improve logging facilities for toaster
This patch improves the logging facilities for toaster in order
to help diagnose bugs that happen on user machines.

The logs are stored now under "/tmp/toaster_$$" where $$ is a
PID-based unique identifier. On shutdown, toaster will automatically
erase all logs unless errors are listed in the log file.

On error, Toaster provides suggestions on what to do.

This patch includes a minor fix found as a result of logging
improvements.

(Bitbake rev: 8a8248f7b7e30469f592e2f8adbf6ce21e8685c5)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:48 +00:00
Alexandru DAMIAN 0c89846daf bitbake: toaster: enhancements for the startup sequence
This patch brings fixes and enhancements in the startup sequence.

- the dependency version checking is now correctly enforced when
starting in both modes
- fixed errors in looking up environment variables
- added message with 'daemon' program start location
- presenting menu for selecting config file

[YOCTO #7283]
[YOCTO #7291]
[YOCTO #7273]

(Bitbake rev: c5ddd9d88910857a1b745b1c237df0390dd56835)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:48 +00:00
Alexandru DAMIAN 202d808f89 bitbake: toastergui: improvements in layer selection logic
This patch clearers and bring fixes for the layer selection
logic in order to enable information collected during build to be used
in configuring projects, specifically targeting the recipes
learned through the building process.

The patch also adds tests to verify the layer selection logic.

[YOCTO #7189]

(Bitbake rev: f0faba8ef0f08c98ac4bddf5b3954d540820d215)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:48 +00:00
Alexandru DAMIAN b741c9a4b4 bitbake: toaster: enable server-side caches and debug-panel
This patch enables the server-side caches for Django using
file cache in /tmp/ directory.

Patch enables django debug panel if available.

(Bitbake rev: 00496fb67fa341477edbf80c5438f0b069871ac6)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:48 +00:00
Alexandru DAMIAN d72f1982ee bitbake: toastergui: fix loadconf error message
Toaster crashes in loadconf if it needs to raise an Exception due
to poorly formatted error message. This patch fixes the formatting

[YOCTO #7276]

(Bitbake rev: 2a18952a525d15814389584817674f6c3aee12d6)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:47 +00:00
Belen Barros Pena ed5c448e2b bitbake: toaster: correct typo in toaster script
A small typo slipped in the message included in
the fix for [YOCTO #6023].

(Bitbake rev: f28fb3d660d8726b75e6c31fa36bc22b54e1bca7)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:47 +00:00
Belen Barros Pena 514b7cf3bf bitbake: toasterui: use text() instead of html()
Use the text() jQuery function instead of the html()
one for security reasons.

(Bitbake rev: b96457870b40ba60dd5c86d83c43093d09b70aea)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:47 +00:00
Belen Barros Pena 16a9667b5c bitbake: toastergui: remove time link for failed build requests
Failed build requests do not have a build time page where
you can look at the time spent on each task. Therefore,
their build time information cannot be a link to such
a page.

(Bitbake rev: b7b1e64f650c9ea676714209b9d6e7efeca992be)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:47 +00:00
Ross Burton 825c0a9835 bitbake: data_smart: split expanded removal values when handling _remove
Given these assignments:

 TEST="a b c d"
 TEST_remove = "b d"

TEST evaluates to "a c".  However, if the _remove override is given as a
variable:

 TEST="a b c d"
 FOO = "b d"
 TEST_remove = "${FOO}

TEST evaluates to "a b c d", because when FOO is expanded it isn't split into a
list.

Solve this by splitting all members of removeactive once they've been expanded.

[ YOCTO #7272 ]

(Bitbake rev: 207013b6dde82f9654f9be996695c8335b95a288)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-03 12:21:36 +00:00
Ross Burton b00e781b4a bitbake: tests/data: add test for incorrect remove behaviour
The _remove operator isn't working correctly when used with a variable that
expands to several items, so add a test case to exercise this path.

(Bitbake rev: cb2a62a5fbffb358528a85b46c1fc6383286cb9d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-03 12:21:36 +00:00
Alexandru DAMIAN 2237c9fcaa bitbake: toaster: proper setup for build configuration
This patch makes sure that all the toaster conf files are actually
written from the build enviroment controllers.

Additionally, toaster checks that the 'daemon' program, which is used
to start the build system, is available (currently for localhost).

[YOCTO #7171]

(Bitbake rev: 0a1db7d1531f8254955e1152bcd8e6db4ec1d277)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-02 12:34:53 +00:00
Alexandru DAMIAN afe85485fe bitbake: toaster: new layer checkout logic
This patch implements a new layer checkout logic that brings more
flexibility in getting layers under different commits work with
Toaster.

The new hibrid logic will checkout separately each layer and commit id;
the task execution will be delegated to the checkedout bitbake, but the
data logger will be executed from the current toaster version as to
bring in enough data to sustain the updates in UI models.

[YOCTO #7171]
[YOCTO #6892]

(Bitbake rev: c6eb0f7f16c59530c2525b2e5629fe86de4e8f0f)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-30 15:14:58 +00:00
Alexandru DAMIAN c58c94824b bitbake: toaster: update texts for the startup sequence
This patch updates the prompts to the user to better explain
what Toaster is doing and the information it needs from the user.

Additionally, fixes a check in loadconf command.

[YOCTO #6785]
[YOCTO #7251]

(Bitbake rev: 90ef8975f35e2da824bc1c80e41ca26d9af0b208)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-30 15:14:58 +00:00
Richard Purdie 635130d0d1 bitbake: data_smart: Don't use mutable objects as default args
These only have one instance created which means your subsequent datastores
can contain echos of previous ones. Obviously this is not the behaviour
we want/expect. It doesn't affect bitbake too badly as we only have one
datastore, it does massively potentially break our selftests though.

Thanks to Tim Amsell for pointing out the now obvious problem!

(Bitbake rev: 9facf3604759b00e8fe99f929353d46f8b8ba5cb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:35 +00:00
Pascal Bach 087424d925 bitbake: parse/ast: Fix issue if path contains '&'
(Bitbake rev: 4fea138f7cef53626a40decb96207dbaf9284020)

Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:35 +00:00
Alexandru DAMIAN 4f7182775c bitbake: toastergui: update project build listing
We update the build listings in the project mode to enable
proper display and selection of build requests that do not have
an actual build object because the bitbake process did not start.

We add a page to display error details for build requests that
did not start a build.

Fixing errors and misspelling in build sections.

Sorting by "timespent" is disabled for build-listing pages.

[YOCTO #7165]
[YOCTO #7156]
[YOCTO #7196]
[YOCTO #7188]

(Bitbake rev: ee13bf45cecd6a0132d724b3206a6f4515669496)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:35 +00:00
Alexandru Damian fefef50e54 bitbake: toasterui: do not filter images by extension
ToasterUI filters build artifacts by extension in order
to determine if a build artifact is an image or not.

Using IMAGE_FSTYPES for this purpose is not correct as
the varible value holding image extensions is just a coincidence.

So we just look if the filename contains the "rootfs" magic
string, which is a pretty good approximation.

[YOCTO #7213]

(Bitbake rev: b11e8bd626e0212ee72914529c3d92d1dd718674)

Signed-off-by: Alexandru Damian <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:35 +00:00
Belen Barros Pena 32b396b8e1 bitbake: toastergui: alignment fix
Align horizontally the pagination and show rows
controls at the bottom of the layer details page.

(Bitbake rev: 8be4a8cf1673112e9e613e719fa6ed96dbca8976)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:35 +00:00
Belen Barros Pena bc63d6bc7b bitbake: toastergui: remove recipe id links to the layer index
Toaster cannot use the recipe id to link to the layer
index, because recipe ids can change. We need to search
by the recipe name instead.

This patch removes the recipe id link from the layer
details page and replaces it with a search by the
recipe name.

It also makes sure links to the layer index open in
a new tab/window.

[YOCTO #7194]
[YOCTO #7193]

(Bitbake rev: 947ef663e452c15933218fd680875ade7cb46e9a)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena a9c0865239 bitbake: toastergui: consistent capitals in button
Capitalise correctly the 'Build target' button label in
the layer details page: it should match the table heading.

(Bitbake rev: 4d52ceb7e66835a3088d83cd4caa002a3e7a1297)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena 05f5435563 bitbake: toastergui: hide table controls when when less than 10 entries
The 'show rows' and pagination controls in the layer details
page should only show when there are more than 10 entries
in a table.

[YOCTO #7217]

(Bitbake rev: 5399738fb2e2956a7d4ce59699dc4b6f6c67bbb2)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena 8a2ec99aad bitbake: toastergui: set column width in layer details page
Set the width of the action columns to span2 to stop
the buttons from wrapping as much as possible.

(Bitbake rev: 4282a92fe3652c52448dba3d5f3fc4e1de28be63)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena d4b9b0f416 bitbake: toastergui: add 'show all' link to no results page
When you search for targets or machines in the layer details
page and your search returns no results, you should
see a 'show all' link that you can click to clear the
search and display all table entries.

[YOCTO #7218]

(Bitbake rev: 70486fc36c5b6bd6b7b8e846e23ad4062d583877)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena c748c7e68a bitbake: toastergui: give the add dependencies form some breathing space
In the editable version of the layer details page, the form to
add dependencies needs some distance from the dependency list.

(Bitbake rev: 2c576552118bcfe65d375ff809b3b4a4916da225)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena 088c19d644 bitbake: toastergui: consistent add / remove layer notifications
In my struggle to ensure consistency in the format and content
of the notifications we show when you add and remove layers to
a project, I've:

* added the project name to the notifications
in the layer details page

* removed the 'Go to project configuration' link
from the notifications in the layer details page

This changes align the notifications we show in the layer
details page with the ones we show in the 'all' pages.

(Bitbake rev: 87deeb2016cbfdaff5531e1badb58761af6df848)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena 571d551a2d bitbake: toastergui: remove redundant style declaration
The bottom margin for dd tags nested inside forms is
set twice. Delete one of them.

(Bitbake rev: 4fcea0aad1ac715d6eb104f60972007bc2289569)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena c04977563f bitbake: toastergui: Generic message for the layer details empty states
In the layer details page, change the message you see when
the number of targets or machines provided by a layer is
0, either because that's what's reported by a layer index
instance, or because Toaster does not have any information
about the layer.

The new message is more generic, in order to fit layers from
all layer sources.

(Bitbake rev: 48123b53d66de01ad6273140aa148276d63707ba)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena 24979f5219 bitbake: toaster: apply common styles to right hand column of detail pages
Layer, recipe and package details pages have a right column
with additional information. This commit standardises the
formatting of the content in that right column across
all these pages by creating a new css class .item-info
in default.css

(Bitbake rev: aed92feac017c967834575344faa3bad7a905b18)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:34 +00:00
Belen Barros Pena a11a34c60f bitbake: toaster: make layouts consistent
The layer details page should have the same layout as all
other detail pages (recipes, packages). For this to happen,
the basebuilddetailpage.html and baseprojectpage.html
templates should use the same layout, and so should the
layerdetails.html and recipe.html templates.

This patch also capitalises the string 'All layers' in the
breadcrumb of layerdetails.html as all other breadcrumb elements.

(Bitbake rev: 49d56fcbbf6b7d0c0c589b93182e4c73071b3fcf)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-29 22:11:33 +00:00
Richard Purdie 745cebd635 bitbake: siggen: Ensure taskdata default functions exist in base class
The get/set_taskdata functions are now part of the API of the class,
ensure they exist in the base class definition so the noop handler
works.

[YOCTO #7233]

(Bitbake rev: 9b5b1bd7d77e3f5886f6c557d3b750de1f6d6025)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 14:39:44 +00:00
Richard Purdie 9538ee9191 bitbake: cooker: Use expanded_data for ASSUME_PROVIDED
Users expect operators like _remove to work on this variable. We need
to use expanded_data to ensure this happens correctly.

[YOCTO #7135]

(Bitbake rev: cc4c8478fc547ea0ebf827a8d319496b39f25684)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:55 +00:00
Richard Purdie 4eb3ffe571 bitbake: cooker: Rename event_data -> expanded_data
event_data would be better named expanded_data, then we can widen its scope
to other places in cooker where we need to access an expanded data store.
We certainly don't want multiple expanded data stores.

(Bitbake rev: 1a3c1c9203e1a1452314954f1cfd771e5c1ce89b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:54 +00:00
Richard Purdie 793f2f2e69 bitbake: server/process: Fix select call
There was a report that bitbake -e | less would use 100% cpu when it shouldn't
really. The issue appears to be a bogus file descriptor in the select call. We
shouldn't be blocking if there is event data pending to a *reader* from server
context.

[YOCTO #7138]

(Bitbake rev: 8f166e1a0f3574ae7d1e917a8bb403b87bad15bf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:54 +00:00
Alexandru DAMIAN d95e988c83 bitbake: toastergui: enable re-ordering when columns are hidden
This patch enables table re-ordering when a sorted-by column is hidden.
This is default functionality in toaster table pages, but was not
enabled for all columns in this situation.

[YOCTO #7125]
[YOCTO #7022]

(Bitbake rev: c1b9c7a05c1c05fcd73d819e8b0142169106f0da)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:53 +00:00
Alexandru DAMIAN 02c49c229e bitbake: toastergui: all projects column show/hide
This patch fixes the show/hide in all projects page.

(Bitbake rev: 1d07020049d3bd824f6d0280c1cc7effa3db339d)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:53 +00:00
Belen Barros Pena ca8c634279 bitbake: toastergui: fix the second 'view all targets' link
The project page has 2 links to the all targets page.
The one at the top of the page is working, but not
the one further down. This patch sorts that out.

[YOCTO #7147]

(Bitbake rev: ad6a2d42b9ce7ce317184d978253e5506be7e47f)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:53 +00:00
Alexandru DAMIAN 2dba91727d bitbake: toastergui: minor fixes
This is a minor fixes patch.

- legacy sorting by "timespent" does not crash the builds pages
- missing xhr_configvaredit view in observer mode is added

(Bitbake rev: bd4ff7a15e74e1d4af8ea3dbaaed141678046a9b)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:53 +00:00
Alexandru DAMIAN 08e5a49afb bitbake: toastegui: project page build selected targets
Fixing the action on the "Build selected targets" button.
Remove "build-button" duplicate id from the build page.

[YOCTO #7047]

(Bitbake rev: 8278d7b15b58484af93d952e594f29dabb9200a9)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:53 +00:00
Alexandru DAMIAN c546815eee bitbake: toastergui: fix all targets page search
This fixes the display of layers in all-targets page search/filtering
usage pattern by displaying layer-equivalence class.

The significant impact is the correct display of the list size
for search/filtering actions

[YOCTO #7051]

(Bitbake rev: 4957ec63a11d51dfac2252263e4d26c705eb31e9)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:53 +00:00
Alexandru DAMIAN 4571c827a4 bitbake: toastergui: fix all-targets redirect
Fixes the all targets redirect to /api/1.0/targets.

[YOCTO #7147]

(Bitbake rev: f1cccafb4c7aa2c338e29ec5d2ea190dfeceb132)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:53 +00:00
Alexandru DAMIAN 8e3be3f268 bitbake: toaster: newproject default release selection fix
This patch fixes the default project release selection to
obey the DEFAULT_RELEASE name set in ToasterSettings.

[YOCTO #7035]

(Bitbake rev: bcd7ba013b973d3b3ac1e0845acf60b80cb227c2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:52 +00:00
Alexandru DAMIAN bdbc37f5c6 bitbake: toastergui: "Run again" button in build pages
This patch fixes the "Run again" button for the completed builds.

[YOCTO #7173]

(Bitbake rev: 37125f2b52492f8bee465611e60514b365541892)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:52 +00:00
Alexandru DAMIAN 99bbf30b1d bitbake: toastergui: fix duplicate IDs all builds page
This patch fixes the duplicate IDs found in the all builds page,
originating in the "Project" column filter.

Also fix misspell "Log1" instead of "Log".

(Bitbake rev: bd681cb2ce349dd7de01c98d5089a368c4514c37)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:52 +00:00
Alexandru DAMIAN c7af070b66 bitbake: toasterui: save event backlog to build
We add a call that saves any queued events to the build

[YOCTO #7021]

(Bitbake rev: 4f5b19d453da64749affc1c27ec51b013bedc71a)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:52 +00:00
Alexandru DAMIAN 4dc8edb610 bitbake: toastergui: save cookie for orderby/page size settings
We save the current settings as cookies on the server side
for the layers, targets and machines pages under Project pages.

[YOCTO #6961]

(Bitbake rev: 58b35c055e37b5e1552d8ba3db2e05ea4ee85023)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:33:52 +00:00
Richard Purdie 8da8a0e55e bitbake: prserv/serv: Improve exit handling
Currently, I'm not sure how the prserver managed to shut down cleanly. These
issues may explain some of the hangs people have reported.

This change:

* Ensures the connection acceptance thread monitors self.quit
* We wait for the thread to exit before exitting
* We sync the database when the thread exits
* We do what the comment mentions, timeout after 30s and sync the database
  if needed. Previously, there was no timeout (the 0.5 applies to sockets,
  not the Queue object)

(Bitbake rev: 0926492295d485813d8a4f6b77c7b152e4c5b4c4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-23 11:31:58 +00:00
David Reyna 6abcc6118d bitbake: toaster: project configuration variables page
Implement the project configuration variables page.

AlexD made whitespace changes and a minor fix.

[YOCTO #6588]

(Bitbake rev: 909fa19f20e909820aa484967b7fe2a34d89ab49)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21 14:37:39 +00:00
Alexandru DAMIAN d1dbf4c078 bitbake: toaster: project builds page
This is a complete re-write of the "Project builds" page
based on the "All builds" page in managed mode.

[YOCTO #6589]

(Bitbake rev: 0353d49ae934c4595408e1b7a1443769f095f2aa)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21 14:37:39 +00:00
Ross Burton 9a51fb39db bitbake: fetcher: use os.path.splitext() instead of string.split()
(Bitbake rev: 1689edd35477a126bfbf4bd3257c4f1f9e16f20d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21 14:37:39 +00:00
Ross Burton f0d5edc91e bitbake: bin/bitbake: only check that /dev/shm is writable on Linux
(Bitbake rev: 7a87ca9518f7239a2dfeb4576c59ea7b1f8d3071)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21 14:37:39 +00:00
Aníbal Limón a67b855df6 bitbake: bb/fetch2/wget.py: latest_versionstring escape packagename when built regex
When built package regex for use in searching upstream version in sites,
the package name need to be escaped to avoid usage of special regex
char.

For example when search for gtk+, '+' need to be escaped.

(Bitbake rev: 1aa1de4b0c5bd34466e04844bbc371933736be59)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21 14:37:39 +00:00
Robert Yang c6f933e5cf bitbake: cooker.py: trap the ENOSPC error and translate it
Trap the ENOSPC error and translate it into a human readable error
message, which is good for debugging.

(Bitbake rev: 2b084dff6ff0d274fbbf7ab07022507f7249e427)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21 14:37:39 +00:00
Richard Purdie e63723f59a bitbake: cooker: Further optimise pyinotify
We currently add crazy numbers of watches on files. The per user limit is 8192
by default and on a system handling multiple builds, this can be an issue.

We don't need to watch all files individually, we can watch the directory containing
the file instead. This gives better resource utilisation and better performance
further reverting some of the performance regression seen with the introduction
of pyinotify.

(Bitbake rev: a2d441237916a99405b800c1a3dc39f860100a8c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21 14:37:39 +00:00
Richard Purdie db45ddeeaf bitbake: command/cooker/knotty: Fix memres handling of command environment changes
If the environment changes, we need memory resident bitbake to adapt to those
changes. This adds in functionality to handle this alongside the configuration
option handling code. This means that the common usage:

MACHINE=X bitbake Y

now works with the memory resident server.

(Bitbake rev: 4d1343010da757a0c126bc22475354da44aaf8e3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21 14:37:39 +00:00
Richard Purdie 08d3f44d78 bitbake: lib/fetch2: Tweak get_srcrev() function description
Tweak the comments on get_srcrev() to better describe its function.

(Bitbake rev: b4d40f1ac7b32990c456cce261f99a5a157b5ae5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-21 11:36:52 +00:00
Alexandru DAMIAN 4e20211090 bitbake: toasterui: fix variable data error
A bug slipped in the toaster ui that prevented saving of
build configuration despite the data being retrieved
from the server. This patch fixes the shaming mistake.

[YOCTO #7117]

(Bitbake rev: 8118f465b9f87c66b2a741008f69198ac5fea901)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16 08:25:31 +00:00
Alexandru DAMIAN 2d78912bc6 bitbake: toastergui: all builds page lists failed build requests
This patch modifies the all builds page by splitting the page
into two variants - the "interactive" (default) and "managed" mode
versions.

In the "managed" mode version, we display build requests instead of
builds, including the failed build requests that have no build
associated with them.

[YOCTO #6671]

(Bitbake rev: c5f5fb80308228585aa7ff9721352feb5ed9c961)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16 08:25:31 +00:00
Michael Wood ce784879f4 bitbake: toaster: layerdetails Remove compatibility setting
Remove the layer compatibility configuration option from the layer
details as this is not in the design.

(Bitbake rev: c46492f5599da8af16af05ecc2d7aa7a8660416b)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16 08:25:31 +00:00
Michael Wood 025533d90b bitbake: toaster: Add layer details page feature
This commit adds the layer details page which shows the metadata for the
layer such as layer description, machines associated with the layer as well
as the targets provided.
If the layer is an imported layer this page also allows you to update
the layer's configuration.
>From this page you can add/remove the layer from the current project

(Bitbake rev: c1442bc68ad8ba20c37b1a7cde1400297f4be811)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16 08:25:31 +00:00
Richard Purdie 2a6f739f1d bitbake: ConfHandler: Clean up bogus imports
The import statements here are plain bizarre. Remove them, tweaking
some of the function calls to match current practices. I can't find any
reason these old imports are as they are.

(Bitbake rev: 4c2f1fe51a13ddc97e518327714292af46b9e1ab)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16 08:25:30 +00:00
Richard Purdie 5c9e2b2f43 bitbake: ConfHandler: Rename oldfn to parentfn to be clearer
Looking at this function I had no idea what oldfn was, I doubt anyone
else would either without looking up what the caller does. "parentfn"
would seem a more appropriate name so rename it.

(Bitbake rev: fc70ed596703a1aa954223b169d4ad51193a6ec1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16 08:25:30 +00:00
Richard Purdie 967f13fda0 bitbake: cooker: Improve pyinotify performance
Benchmarks show that the introduction of pyinotify regressed
performance. This patch ensures we only call the add_watch() function
for new entries, not ones we've already processed which does improve
performance as measured by "time bitbake -p".

This doesn't completely remove the overhead but it does substantially
reduce it.

(Bitbake rev: 493361f35f6cc332d4ea359a2695622c2c91a9c2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-16 08:25:30 +00:00
Richard Purdie eb7480fc4d bitbake: cooker: Fix pyinotify handling of ENOENT issues
We try and add watches for files that don't exist but if they did, would influence
the parser. The parent directory of these files may not exist, in which case we need
to watch any parent that does exist for changes. This change implements that fallback
handling.

(Bitbake rev: 979ddbe4b7340d7cf2f432f6b1eba1c58d55ff42)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-14 13:34:06 +00:00
Richard Purdie 6c3c3e11f6 bitbake: cooker/cache/parse: Implement pyinofity based reconfigure
Memory resident bitbake has one current flaw, changes in the base configuration
are not noticed by bitbake. The parsing cache is also refreshed on each invocation
of bitbake (although the mtime cache is not cleared so its pointless).

This change adds in pyinotify support and adds two different watchers, one
for the base configuration and one for the parsed recipes.

Changes in the latter will trigger a reparse (and an update of the mtime cache).
The former will trigger a complete reload of the configuration.

Note that this code will also correctly handle creation of new configuration files
since the __depends and __base_depends variables already track these for cache
correctness purposes.

We could be a little more clever about parsing cache invalidation, right now we just
invalidate the whole thing and recheck. For now, its better than what we have and doesn't
seem to perform that badly though.

For education and QA purposes I can document a workflow that illustrates this:

$ source oe-init-build-env-memres
$ time bitbake bash
[base configuration is loaded, recipes are parsed, bash builds]
$ time bitbake bash
[command returns quickly since all caches are valid]
$ touch ../meta/classes/gettext.bbclass
$ time bitbake bash
[reparse is triggered, time is longer than above]
$ echo 'FOO = "1"' >> conf/local.conf
$ time bitbake bash
[reparse is triggered, but with a base configuration reload too]

As far as changes go, I like this one a lot, it makes memory resident bitbake
truly usable and may be the tweak we need to make it the default.

The new pyinotify dependency is covered in the previous commit.

(Bitbake rev: 0557d03c170fba8d7efe82be1b9641d0eb229213)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-14 11:32:02 +00:00
Richard Purdie 83f8a4002a bitbake: bitbake: Add pyinotify to lib/
We need inotify support within bitbake and pyinotify provides the best
mechanism to add this. We have a few options:

a) Depend on pyinotify from the system
b) Add in our own copy
c) Only use pyinotify in cases like the memory resident server

For a), it would mean adding in dependencies, updating documentation and
generally creating churn for users as well as having implications for things
like the build-appliance recipe.

It turns out that glibc has the C functionality we need from version 2.4
onwards (2006) and that we just need a single python file for b), there
is no binary module needed. We therefore add in a copy of pyinotify 0.9.5
into the tree meaning we can depend on it simply and unconditionally.

c) is unattractive as we need fewer possible code paths, not more.

(Bitbake rev: d49004a4e247e3958a2f7ea9ffe5ec92794e1352)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-14 11:32:02 +00:00
Aníbal Limón 3cd31b19d3 bitbake: bb/fetch2/ssh.py: Fix urldata.localpath use os.path.normpath
When urls ends with trailing slash os.path.basename return "" [1]
and built urldata.localpath only with DL_DIR, it causes that
donestamp is built as DL_DIR + '.done' and seems that ssh resource
was already download.

[YOCTO #6448]

[1] https://docs.python.org/2/library/os.path.html#os.path.basename

(Bitbake rev: 47992591349bab2c12741b937096e41085399087)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-14 11:32:01 +00:00
Richard Purdie 83a30dfd49 bitbake: fetch/git: Improve ls-remote handling for latest_revision
Currently the code ignores lightweight tags which has caused some user
complaints. We can't put the right search list in place easily since
the results don't come back in a good order, head happens to sort
before tags.

In the end I refactored the function so we get the complete list of
remotes and then we can filter it ourselves in the order we chose,
including checking for light weight tags, preferring the proper ones.

Hopefully this resolves the issues people have been seeing.

[YOCTO #6881]

(Bitbake rev: 07ad307065bb15a48f0015b9e4a643201abdc283)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-14 11:32:01 +00:00
Alexandru DAMIAN 876370419a bitbake: toaster: implementation of project page
This patch brings the project page in line with the design,
including build error handling and suggestions.

Includes some refactoring for already existing code.

[YOCTO #6587]

(Bitbake rev: 1ea658dcdfde5465d3ecdb97550e0a66cb8b122e)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 22:34:38 +00:00
Alexandru DAMIAN 66e1b520d7 bitbake: toaster: branch name priority resolution
Adding a Layer_Version function that gets back the
branch name that should be used/displayed for finding the
targeted git branch name.

Change the commit id to use the branch name instead of the
last-updated commit hash from the layer source.

[YOCTO #7031]

(Bitbake rev: 1a52202f7f3719f5421289aaf0fc8eba0bf4c7ce)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 22:34:37 +00:00
Alexandru DAMIAN 3e73af423f bitbake: toaster: do not launch web browser on noweb option
This patch makes Toaster managed mode obey the "noweb" parameter
by not starting the web server and launching the web browser
command if the "noweb" parameter is specified.

The web browser will be pointed at 127.0.0.1 instead of 0.0.0.0

[YOCTO #7039]

(Bitbake rev: 4037f8b08bc9fb5c4c9f260efb847105be718a32)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 22:34:36 +00:00
Alexandru DAMIAN 3c37669272 bitbake: toaster: write pre-read conf file for build variables
We change the setting of variables from directly injection
into the set-up cooker to writing a conf file that is pre-read
on bitbake server startup. This is needed because the injection
can only happen after the variable set is parsed, and the variables
already inferred, so setting up variables happens too late.

[YOCTO #7045]

(Bitbake rev: 854f680b5b9d2d0fa796af84cb1218545fbfc55a)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 22:34:36 +00:00
Michael Wood ed9fa17467 bitbake: toaster: Improve client side error handling
Make use of the toastermain.settings.DEBUG flag to toggle the client
side error logging. Make the error logging consistent by using
console.warn/error across the project, this adds traceability to the
warnings. Also handles the case where console is not available by
stubbing it in libtoaster.

(Bitbake rev: c34ebc51a6cbf90c64ef1ac461e475c6341f0f2a)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 22:34:36 +00:00
Richard Purdie 2e26745a13 bitbake: ast: Add error when trying to use dash in sh function names
A dash character is illegal in function names in sh (but not bash). Since
our shell tasks run under sh and the shell parser is sh based, EXPORT_FUNCTIONS
won't work with class names containing a dash.

We can't change sh, we can ensure the user is warned about the problem
straight away though.

[YOCTO #7006]

(Bitbake rev: 86704281b79e524dccccc88cbf996b299b33bae2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 10:38:36 +00:00
Richard Purdie 97d44bf526 bitbake: cache/fetch2/siggen: Ensure we track include history for file checksums
Currently, if you reference a file url, its checksum is included in the
task hash, however if you change to a different file at a different
location, perhaps taking advantage of the FILESPATH functionality, the
system will not reparse the file in question and change its checksum to
match the new file.

To correctly handle this, the system not only needs to know if the
existing file still exists or not, but also check the existance
of every file it would have looked at when computing the original file.

We already do this in the bitbake parsing code for class inclusion. This
change uses the same technique to log the file list we looked at and
if files in these locations exist when they previously did not, to
invalidate and reparse the file.

Since data stored in the cache is flattened text, we have to use a string
form of the data and split on the ":" character which is ugly, but is
an internal detail we can improve later if a better method is found.

The cache version changes to trigger a reparse since the previous
cache data is now incompatible.

[YOCTO #7019]

(Bitbake rev: 6c0706a28d72c591f1b75b6e3f3b645859387c7e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 09:52:52 +00:00
Richard Purdie 26cd67e63a bitbake: wget: Add localpaths method which gives localpath with history
In some cases for cache purpoes we not only need to know which file
is going to be used but also which paths were considered. Add a
localpaths method which includes the history.

The core which() funciton already supports this, this just extends
the function to preserve the extra data we need. localpath becomes
just a special case of the case with history.

(Bitbake rev: ea5efeac5c1f7986666c979f789786f29fc1619a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 09:52:52 +00:00
Richard Purdie 130958cc24 bitbake: bitbake-worker: Use setsid() rather than setpgid()
The bug has a long discussion of this. Basically, in some environments,
the exact details of which aren't understood, a Ctrl+C signal to the
UI is being transmitted to all the process children. Looking at the output
of "ps ax -O tpgid", its clear the main process is still the terminal
owner of these processes.

stty -a on a problematic system shows: "-ignbrk brkint"
and on a working system shows: "-ignbrk -brkint"

The description of brkint would suggest this is the problem, setting up
that terminal environment wasn't able to reproduce the problem though.
It was confirmed that using setsid() caused the problem to be resolved
and is probably the right thing to be doing anyway, so lets do it.

[YOCTO #6949]

(Bitbake rev: 461aa73fff0ab616032d28c4fd0322eb88838be6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 09:46:58 +00:00
Richard Purdie 1393e224b5 bitbake: cooker: Shut down the parser in error state
If the cooker is in an error state, we shouldn't continue to try parsing.
This fixes an issue where an invalid PR server is detected when bitbake
is started and ensures bitbake exits cleanly rather than hanging.

[YOCTO #6934]

(Bitbake rev: 294bb9cad294423d4f8998405ceff58655f12660)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-08 09:42:24 +00:00
Paul Eggleton 8b8d46f31e bitbake: utils: make edit_metadata_file() handle VARIABLE +=
This is a little crude as the usage basically ignores that you're doing
an append operation, but for a lot of cases it will be sufficient.

(Bitbake rev: 24a28205ab680b6cc645d97b76c9855920608229)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-30 09:21:42 +00:00
Paul Eggleton b264f5629b bitbake: bitbake-layers: fix error handling in add-layer / remove-layer
* Fix add-layer error message when a layer is already in BBLAYERS
* Ensure we show an error message if we can't find BBLAYERS at all

(Bitbake rev: 1c743fd2103730e27699dd55efc6914d3b0c3702)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-30 09:21:42 +00:00
Richard Purdie e75139cc9d bitbake: fetch2/wget: Fix horrible temp file handling
Hardcoding a temp directory is bad practice and leads to races between
the tests. There is no longer any good reason for doing this, drop it
and ensure the files get cleaned up correctly.

(Bitbake rev: 10a47b1ec7470c9e8c4ffe0bb35cdf6d1bb2ee2e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-25 08:18:14 +00:00
Richard Purdie 1d4908ddb2 bitbake: tests/data: Add a key deletion test
If you copy the datastore, then delete a key, it should not exist in
d.keys(). This adds a test to cover the recently found data store bug.

(Bitbake rev: 16d5f40ad20fd08bf7a4d0e36200c739b5a9f59e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-25 08:18:14 +00:00
Richard Purdie 4d06fb7307 bitbake: tests/fetch: Add versionstring tests to network tests list, fix print()
The versionstring tests hit the network so should only run when
network tests are enabled.

Also remove the print statement which confuses the test output and
add it to the test failure message instead.

(Bitbake rev: 6c046660cfc4fb3792a42aeafff91a13f68a2e89)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-25 08:18:14 +00:00
Richard Purdie 544533922d bitbake: data_smart: Ensure d.keys() doesn't list deleted variables
If you copy the datastore, then delete a variable, it still shows up
in d.keys() when it should not. This patch addresses the issue.

(Bitbake rev: f28ee1bb03cb32d3757fbef67c9fbe143e3dadfa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-25 08:18:13 +00:00
Aníbal Limón 8c906632e7 bitbake: bb/fetch2/wget.py: latest_versionstring fix multithread and remove deprecated code
In order to fix multithread usage of latest_versionstring moves package_custom_regex_comp
from class to method level because need to be defined by package.

Remove code for build url's with /download suffix because it's deprecated since you can
specify the download directory using package_regex.inc file.

(Bitbake rev: 231cae9f9b552ec6737795c098d1de426b5adcbc)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:21 +00:00
Andy Voltz 6b33e1a840 bitbake: ui/ncurses: Update ncurses ui to accept configParams
(Bitbake rev: 730b4c50364fba7173309278d670eda02e0ce38e)

Signed-off-by: Andy Voltz <andy.voltz@timesys.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:21 +00:00
Paul Eggleton d31b7bdf11 bitbake: cooker: add ability to ignore unmatched regexes in BBFILE_PATTERN
Add a BBFILE_PATTERN_IGNORE_EMPTY variable to allow ignoring the fact
that a regex specified in BBFILE_PATTERN for a particular collection
doesn't match any recipes. This will be used in OpenEmbedded in the
workspace layers created by "devtool" which may not always contain any
recipes (which is not cause for warning the user).

(Bitbake rev: 19c74aaa2836a88d666f0032452fac521689ab6b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:21 +00:00
Paul Eggleton db3f589f49 bitbake: bitbake-layers: add commands for adding and removing layers
Add add-layer and remove-layer commands for easily adding and removing
layers to/from bblayers.conf.

(Bitbake rev: 0e94aed033917b91ea6ba0522b14a040c3bdc987)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:21 +00:00
Paul Eggleton b1e5a6794f bitbake: utils: add basic metadata manipulation functions
* Add a generic edit_metadata_file() function to modify variable
  assignments in any metadata file (conf, bb, bbappend) using a callback
  for flexibility
* Add a specific edit_bblayers_conf() function to modify
  conf/bblayers.conf and add and/or remove layers from the BBLAYERS
  value within it.

(Bitbake rev: aa03a28b442549dd8ffe92ae4d6390f62202a76a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:20 +00:00
Paul Eggleton 7b70d5e8a4 bitbake: siggen: ensure nostamp tasks force dependent tasks to re-execute
If a nostamp task is depended on by a non-nostamp task, then we want the
signature of that task to change such that it re-executes afterwards.
This is an unusual situation, but we want this to work in OE in
externalsrc.bbclass so that compilation happens every time it is
requested.

(Bitbake rev: 73498afc3d45beede5b8f24a9acd523a1663b793)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-23 10:18:20 +00:00
Richard Tollerton 0a791e91e5 bitbake: data: escape '$' in shell variable assignment
Running bitbake inside make results in the exported environment variable
MAKEOVERRIDES="${-*-command-variables-*-}", which the shell chokes on
when trying to expand it. But of course, it probably shouldn't have been
trying to expand it in the first place -- so just escape the dollar
sign.

(Bitbake rev: 18cd0ce6a55c9065c3f1bf223b47d817b5efcd8f)

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:28:44 +00:00
Michael Wood bb83fccb4b bitbake: toaster: importlayer Tidy up the page initialisation
Tidy up the page initialisation and change the error logging so that
it's consistent with other pages.

(Bitbake rev: 3a5b78af4f3cab203824d933a73e82a41ab377e3)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:08 +00:00
Belen Barros Pena 641c50d79b bitbake: toaster: Change the full stop to a colon
In the import layers notification for multiple layers
there was a full stop where there should be a colon.

(Bitbake rev: c23736003b788f2b45ae7cbcd7c7250ead2e5724)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:08 +00:00
Belen Barros Pena 6f3f05936c bitbake: toaster: Formatting changes to error messages
Just giving a bit of space to the content of the error
messages we show when you try to import a layer that
already exists.

(Bitbake rev: 19b8ff1949072691dade96038af529200175843a)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:08 +00:00
Michael Wood c89fd79398 bitbake: toaster: projectapp Add links to the imported layers notify
Adds links to layer details for each of the layers that has been added
to the project.

(Bitbake rev: 07e5c7c82519604501feb7d892db330c610978e9)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Michael Wood 8d96256c39 bitbake: toaster: importlayer Avoid namespace clash with layer name
This was causing validation issues as the layer name was being picked up
from a different location in the dom.

(Bitbake rev: 54165dd929ef304357806411cd70caf85b6132f0)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Michael Wood dadc11a52f bitbake: toaster: Importlayer add notify exactly which layers changed
This changes when the dependencies are added to the project so that we
can know which ones were successfully added by waiting for the server to
respond with a list. This is more reliable because we may have specified
dependencies which are already in the project.

To pass this information to the project page a temporary cookie is used
with the values for the notification.

(Bitbake rev: 23ca89dc3e0f0ea387649f1e9e8d7d50846048d6)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Belen Barros Pena bd6b8796a1 bitbake: toaster: tweaking the import layers form
This commit makes the following changes to the import
layers form:

* In the explanatory text at the top of the page, show only
the release description (to match the information shown in all
other pages)

* Make sure the spacing between form fields and labels is
consistent across the form

* Change the 'Branch, tag or commit' label to 'Revision'
and add some help text to the label

* Change the help text and the input type in the layer
 description

* Change the help text next to the form actions to match
the new field ordering in the form

(Bitbake rev: 1fae3ef8f87a836758519c85afb2762768c29efc)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Michael Wood 1605cd37db bitbake: toaster: Add import layer feature.
This feature allows users to import layers from git into their current
project and associate it with the release of the current project and the
dependencies for the newly imported layer with existing layers.
It will also resolve the child dependencies of the dependencies added.

[YOCTO #6595]

(Bitbake rev: 017f5c746e894f9d87d927c848386459ea332378)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Alexandru DAMIAN 13141af708 bitbake: toasterui: refactor project layer finding logic
This is a basic refactoring of the code computing
the layer equivalence classes for a project, in order to
bring common bits of logic in a single place.

(Bitbake rev: 9bdd0a687ba74577f2c0f0b6c696433ea662d38f)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Michael Wood 7d5cd68a7d bitbake: toaster: libtoaster Add editProject and getLayerDepsForProject
Add two utility functions for editing project settings and returning the
layer "dependencies" for a specified layer.

(Bitbake rev: 5f98f245bdd381a141a018a7f9953a5510fbb4df)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Michael Wood d5fc4f7f13 bitbake: toaster: libtoaster Add a error handler to GET in makeTypehead
If the JSON data comes back from the request with an error set, have a
default handler which logs the error to the console.

(Bitbake rev: 9e3f2e2d985a575adb5520d8b517eac5ad6a15ed)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Belen Barros Pena c058c373f6 bitbake: toaster: Initialise the 'change' icon tooltips
All 'change' icons should have a tooltip that appears
when you hover over them. The tootlip says (fittingly):
"Change". Initialise those icons in the libtoaster.js
file so that they work outside the project page.

(Bitbake rev: c635dd71670030da78c52545d2bb32b8c485c1af)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Belen Barros Pena 3910763db7 bitbake: toaster: base Only show change project icon when > one project
In the new build button, it only makes sense to change
the selected project when there is more than one project
in the Toaster instance. If the number of projects is 1,
we hide the change project icon.

(Bitbake rev: e354a40d7dbcd85fea9d37d3983428e4470df2dd)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:07 +00:00
Alexandru DAMIAN 4061fcdeeb bitbake: add POST endpoint for uploading eventlog files
This patch adds a simple UI-less POST endpoint, where
bitbake_eventlog.json files generated by a bitbake run can be
uploaded to the running toaster instance for insertion into
the database.

(Bitbake rev: cf98a8cbc5dd7a41bbe5fdebcd81e29b1621ff35)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:06 +00:00
Alexandru DAMIAN aa9816ad79 bitbake: toastergui: implement UI changes to allow file download
This patchset adds download links in the build analisys pages
if toaster runs in managed mode. This allows the user to access
data directly from the web interface.

[YOCTO #6837]

(Bitbake rev: 6000e1ae5c846e51932ecd0dc21e0fa02eb10357)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:06 +00:00
Alexandru DAMIAN 85a17f86ea bitbake: add option to write offline event log file
This patch adds a "-w/--write-log" option to bitbake
that writes an event log file for the current build.

The name of the file is passed as a parameter to the "-w"
argument. If the parameter is the empty string '', the file
name is generated in the form bitbake_eventlog_DATE.json,
where DATE is the current date and time, with second precision.

The "-w" option can also be supplied as the BBEVENTLOG
environment variable.

We add a script, toater-eventreplay, that reads an event
log file and loads the data into a Toaster database, creating
a build entry.

We modify the toasterui to fix minor issues with reading
events from an event log file.

Performance impact is undetectable under no-task executed builds.

(Bitbake rev: 1befb4a783bb7b7b387d4b5ee08830d9516f1ac2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:06 +00:00
Alexandru DAMIAN d086fa3aed bitbake: toasterui: add extra debug and development infos
We update and add logs throughout the code in order to help
with development. The extra logging is turned off by default,
but it can be enabled by using environment variables.

All logging happens through the Python logging facilities.

The toaster UI will save a log of all incoming events if the
TOASTER_EVENTLOG variable is set.

If TOASTER_SQLDEBUG is set all DB queries will be logged.

If TOASTER_DEVEL is set and the django-fresh module is available,
the module is enabled to allow auto-reload of pages when the
source is changed.

(Bitbake rev: 10c27450601b4d24bbb273bd0e053498807d1060)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:06 +00:00
Alexandru DAMIAN f99f2cdd69 bitbake: add build artifacts table and other improvements
We add a BuildArtifacts class to store data about files
discovered during the build process and not stored anywhere
else.

Small cosmetic changes in the toasterui.

Add model methods to return file path display data relative
to the build environment instead of absolute file paths.

[YOCTO #6834]

(Bitbake rev: bbe24d912869312d561be199b2c029b0c898e049)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:06 +00:00
Robert P. J. Day ec6377bcf5 bitbake: bitbake-user-manual-metadata.xml: Updated do_package_write example
Given that the "do_package_write" task doesn't exist in OE anymore,
steal another, existing example to demonstrate the "rdeptask" flag.

(Bitbake rev: 9e27bb2869e8ec6781d2f68d0585ebbf9ca6f3d8)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-09 22:25:36 +00:00
Scott Rifenbark d5a808d6b3 bitbake: bitbake-user-manual-metadata.xml: Added [eventmask] flag information.
Reported-by: Laszlo Papp <lpapp@kde.org>
(Bitbake rev: 38150bc53c6bda5be7194f9acd112d362506d2ea)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-09 22:25:36 +00:00
Richard Purdie 1aae44787c bitbake: runqueue: Fix 100% cpu use after keyboard interrupt
After Ctrl+C is pressed to interrupt bitbake, it loops continually, running
at 100% cpu. This patch selects on the correct file descriptors resolving
the excess cpu usage.

(Bitbake rev: 497404e8484b7ca7c11e459bf0845642156eb677)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-09 22:15:49 +00:00
Richard Purdie eb2ea6fd2d bitbake: data: Handle BASH_FUNC shellshock implication
The shellshock patches changed the way bash functions are exported.
Unfortunately different distros used slightly different formats,
Fedora went with BASH_FUNC_XXX()=() { echo foo; } and Ubuntu went with
BASH_FUNC_foo%%=() {  echo foo; }.

The former causes errors in dealing with out output from emit_env,
the functions are not exported in either case any more.

This patch handles things so the functions work as expected in either
case.

[YOCTO #6880]

(Bitbake rev: f28f37220e7787721a31b659521a1c44ebea92bf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-09 22:15:49 +00:00
Paul Eggleton 9c02ad9fc9 bitbake: event: fix resetting class handlers object
If you don't explicitly specify to use a global variable when doing an
assignment, you will be setting a local variable instead, which means
this function wasn't working at all. It explains some odd behaviour we
have seen in the layer index where event handlers were sometimes
bleeding into other contexts where they should not have been.

(Bitbake rev: ac45ea848901b0f6cd23087b662dde8ce9cd807e)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-09 22:15:49 +00:00
Paul Eggleton c1ef10afb6 bitbake: event: add a means of filtering events internally
When using external tinfoil-based utilities, it is useful to be able to
turn off most of the event handlers; for example sstate_eventhandler
doesn't like being sent events for any recipe which has been skipped.

(Bitbake rev: 41236c28985a3b66b3737382a94e39dbf6480160)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-09 22:15:48 +00:00
Paul Eggleton eb0a6fc210 bitbake: fetch2: add means of disabling SRC_URI checksums
If we're fetching outside of the context of a recipe, it's handy to be
able to disable checksum functionality so you don't get a meaningless
warning about the signatures being missing.

(Bitbake rev: 49dbcfbc56a206964acc5de761bba31be0283ba1)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-09 22:15:48 +00:00
Paul Eggleton cde28486b0 bitbake: utils: add exec_flat_python_func()
Add a function that allows executing a flat python function (defined
with def funcname(args): ...).

(Bitbake rev: 20e6939ebcb62e08a9a7ad586a915dfe368136a0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-09 22:15:48 +00:00
Scott Rifenbark 8ff0840412 bitbake: bitbake-user-manual: Updated copyright to 2015.
(Bitbake rev: be8f0076667f17587dbcff4b6b6467a7ec29d2b8)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-09 22:14:47 +00:00
Richard Purdie 9315a2b645 bitbake: bitbake: Update to 1.25.0 as development version after release
(Bitbake rev: 94d9590a4310f96396e8e782bcf65918f4dcdb36)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-03 12:24:01 +00:00
Ross Burton b92ec90ea4 bitbake: data: rename defaultval to _defaultval
The defaultval field is intended to be internal and the only use of that field
outside of data.py is to skip over it when iterating over a value's flags.

For clarity and convenience, rename the field to _defaultval so that it is
considered internal and not exposed through the data API.

(Bitbake rev: 2800958dadaa5c055ba21d52c98d842d360f0785)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-03 12:24:00 +00:00
Richard Purdie 2fc06a12a1 bitbake: cooker: Allow featureset in error state
Currently, if an invalid PR service is selected the server will error
with a traceback. This is because its set into the error state and the
setFeature code will then fail since its not in the initial state.

Modifying the featureset in the error state is acceptable, we just need
to ensure we don't trigger a reset, that would happen from whichever
code handles the error.

[YOCTO #6934]

(Bitbake rev: c52841445d8db8f84c4da34203b195fea5874247)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:02 +00:00
Aníbal Limón b585c4b8b8 bitbake: fetch/wget: latest_versionstring clean improvments minor
Update documentation strings in _check_latest_dir and _check_latest_version
methods with  the correct return types.

_check_latest_version method remove unused testversion variable.

(Bitbake rev: e30c11af7bc8a1f3d8c9198ee3c0065bd6b447cc)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:02 +00:00
Aníbal Limón 0ce833dfa2 bitbake: tests/fetch: Update wget latest_versionstring cups case
Update test case for cups is needed because match only 2.0.0
versions see VERSION=2\.0\.0 in the previous string.

(Bitbake rev: 148aba30155f4de17f6c6fb9b4c37f08a2db202b)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:02 +00:00
Aníbal Limón 158aee79f6 bitbake: fetch/wget: latest_versionstring remove newuri set because is previous set
(Bitbake rev: d2890c8868281cb7d89a8dc66e5db589cddb3363)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:02 +00:00
Aníbal Limón 75b82b03b0 bitbake: fetch/wget: latest_versionstring add support for search in RAW html lines
Some upstream sites put the name of the package in the body of href tags,
i.e. <a href="#43">somepackage-v1.4.10.tar.gz </a>.

(Bitbake rev: 4fa8542a8880d5749fbb3382706e011b012024d0)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:01 +00:00
Aníbal Limón aa35076f34 bitbake: fetch/wget: latest_versionstring remove unnecessary usage for name in version comparision
(Bitbake rev: 91b6b38ccee5e9d5bb27e4cd1578356c3b3dc607)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:01 +00:00
Aníbal Limón 4b2932906c bitbake: fetch/wget: latest_versionstring improvments in searching
Validate if package contain version string if not return the current
version cases for spectrum-fw and corpus recipes.

_check_latest_version return the latest version available don't
take into account the current version previous this only return
the upstream version if it greater than the current version.

(Bitbake rev: 91a7ac8c7f87f98e366585cf9720ec35b0790bae)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:01 +00:00
Aníbal Limón af47f14c71 bitbake: fetch/wget: latest_versionstring add package_custom_regex_comp
package_custom_regex_comp is built with the current package name and
then used to search upstream version this reduces custom regex'es in
sites that have different packages in the same directory.

(Bitbake rev: a69d5d48c4bf9a3df3121cc4e69ba5d7e947ad8d)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:01 +00:00
Aníbal Limón cd40af6b1d bitbake: fetch/wget: Improve REGEX_URI handling
Latest version string only try to find latest directory when REGEX_URI
isn't specified to avoid unnecessary processing and makes code easier

(Bitbake rev: afc33ec7cdb7d8ee3602a23fa973551ca5510ac4)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:01 +00:00
Aníbal Limón a7bdd0eb29 bitbake: fetch/wget: _init_regexes rename variables to be more consistent and move dirver_regex into it
(Bitbake rev: 583e5d9c1c3cb8a25d34648078200faadc597e9c)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:00 +00:00
Aníbal Limón 35b7089b34 bitbake: fetch/wget: latest_versionstring create _init_regex method for have one place when regex'es are defined
(Bitbake rev: 6989193a875afd0b1f0f88c95e28cb81bfdb4eaf)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:00 +00:00
Belen Barros Pena 6cecdd1f36 bitbake: toaster: remove the word 'project' from layers and machine
Remove the word 'project' from the 'Layers' and 'Machine'
sections of the project page, following feedback from the
QA team, who suggested that the word 'project'
raised questions regarding the scope of the configuration,

(Bitbake rev: 1bf19f66260aaca2caa300e976bf90479e2c48f3)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:00 +00:00
Belen Barros Pena fee87cdd57 bitbake: toaster: release name consistency
Small changes to the project, new project and all layers
pages to ensure consitency in release naming across the
interface.

The changes are:

* In the new project page, change the label 'release version' to
'release'

* In the new project page, sort the releases in the dropdown menu
in ascending alphabetical order

* In the new project page, remove the release name that was
showing between brackets after the release description in the
dropdown menu

* In the project page, make sure the release information
shows the release description field instead of the release name,
to keep consistency with the new project page

* In the all layers page, provide some help text for the branch 'HEAD'

(Bitbake rev: 9a90bf201dab83060f0bdd6ac08c72b8d62f6060)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:00 +00:00
Alexandru DAMIAN af51fb0674 bitbake: toasterui: Compatibility patch for daisy and dizzy
This patch brings in changes that allow a toasterUI coming in
from 'master' branch to record data from a 'daisy' or 'dizzy'
bitbake server.

This is needed to allow Toaster to record builds running
on older branch releases.

(Bitbake rev: 8d75e28e0688a6520311afce36543175f36910b3)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:03:00 +00:00
Belen Barros Pena dc1be9c438 bitbake: toaster: fix padding of build notifications
In managed mode, we show the name of the project in the build
notifications of the all builds page. The way we show the
project requires modifying the default padding of the .alert
class. This patch makes sure the padding modification is
only applied in managed mode, i.e., when the project name
needs to be shown.

(Bitbake rev: d1cd8b229c402fae3499e35415ad79c0e11ee517)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:59 +00:00
Belen Barros Pena c31f30918b bitbake: toaster: make 'latest builds' section consistent across pages
Make sure that the 'latest builds' sections in the all builds
page and the project page are identical:

* no icon to represent build outcome
* remove machine name
* show date only when the build is more than 24 hours old
* same date and time format

(Bitbake rev: 99ac7379e5df6c5cc491c2be591b15ad7ec04caa)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:59 +00:00
Belen Barros Pena be2475b409 bitbake: toaster: fix errors and warnings display
In the 'Latest builds' section of the project page,
show number of errors and number of warnings as we
show them in the all builds page.

(Bitbake rev: 3f6b33472820e339c0f057c2e30f25ec2a04366b)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:59 +00:00
Alexandru DAMIAN 126bca43b7 bitbake: toastergui: new project page
Patch that brings in to new project page according to specifications.

[YOCTO #6596]

(Bitbake rev: be357d147d525ac3d6b7bd33ca0aa594728ffedd)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:59 +00:00
Alexandru DAMIAN 5790337cec bitbake: toaster: fix loadconf path calculation
Fixing the path calculation for local layer sources, as the
path need to be absolute.

Added tests for pieces of code.

(Bitbake rev: e764834f3c7c7da9356fa11b62e1fa8f643986fc)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:58 +00:00
Alexandru DAMIAN d9644d49fd bitbake: toasterui: fix layer identification for managed builds
If we have a managed build, we match the layers used for build
with the layers configured for project, as we know where the layers
are coming from

[YOCTO #6962]

(Bitbake rev: e02ec052a62cbc476bdac65cb7cea1167ce04781)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:58 +00:00
Alexandru DAMIAN af1f9fda8b bitbake: toaster: display Toaster exceptions and other fixes
Changing ToasterUI to log toaster exceptions on a different level than
build errors.

Updating the build dashboard to show Toaster exceptions.

We add extra logging to console for exceptions.

Fixed a problem where packages database entries were created instead of
being looked up in the database, conficting with entries created to
satisfy dependency information.

Toaster now checks for invalid states at startup and performs needed
cleanups.

Removed loading reference to jquery-ui.min.css as we do not have this
file.

(Bitbake rev: 2378812bc24d433125fb940f110154f0ce638448)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:58 +00:00
Alexandru DAMIAN 707a960ffa bitbake: toastergui: do not show project info in interactive mode
The most recent builds section showed the project name and the Run Again
buttons regardless whenever the Toaster was in interactive or managed
modes. These widgets have no meaning in interactive mode, and this
patch disables the widgets if toaster is not running in Managed mode.

[YOCTO #6776]

(Bitbake rev: 86dced90db666aa73ebb7ebb48d64fc08f66e7e2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:58 +00:00
Alexandru DAMIAN 4c82dfbb70 bitbake: toastergui: update layer search criteria
In order to accomodate the designs around imported layer,
we add a "project" field for in the layer versions.

The field must be set if and only if the layer is manually
imported in the project. This will prevent information leakage
between different projects.

The views have been updated to perform relevant layer queries
in a single location.

(Bitbake rev: e1f7ec868b0702dfd27d5708581c134aaa6f4ae8)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:58 +00:00
Michael Wood 152e2d9cc5 bitbake: toaster: base Only show New Build button when there are > 0 projects
Only show new build button if we have defined at least one project as we
can't select a project to build against if there are no projects created
yet.

(Bitbake rev: 6daada59ee846c4e957bba3574dc262a0c79854d)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:57 +00:00
Alexandru DAMIAN 49ac18dd0f bitbake: toaster: use http proxies to fetch data
Under some network configurations http proxies are used
for Internet access. This patch makes Toaster obey
the http_proxy environment variable when fetching
information from layer indexes.

(Bitbake rev: 9f3cf52b3a96768e5b9764dde02833b078fe61e4)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:57 +00:00
Belen Barros Pena 39bace01e2 bitbake: toaster: do not show target if target name is empty
In the all targets table, all entries should have a target
name. If a target does not have a name, something has not
gone to plan, so don't show it.

(Bitbake rev: 27023ce2d264ce05008ef9af33982b054c6a87b5)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:24 +00:00
Belen Barros Pena f3ffeba4a7 bitbake: toaster: fix dependencies dialog layout
Remove the bottom margin of forms inside dependencies
modal dialogs.

(Bitbake rev: dc9b4a4ab06ed49f3fcab4f644b8bc136f19fdb0)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:24 +00:00
Belen Barros Pena 57b8ccc670 bitbake: toaster: add no results state to all layers page
When you search for a layer and your search returns no results,
we should show you an alert and a link to show back all layers,
as we do in all other tables.

(Bitbake rev: c67a5dd8026833e167c58a17643febee130dbb35)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:24 +00:00
Belen Barros Pena 2066b9b47f bitbake: toaster: Tiny refinements to the new build button dialog
* Get rid of the display:block attribute for the "View
all projects" link, to stop it from firing when you
click outside (but next to) the link

* Give some margin to the incomplete configuration
alert

(Bitbake rev: 83af0db872ea28965cd6007ad72ff210f67a4f30)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:24 +00:00
Michael Wood 3530316f9b bitbake: toaster: project page remove additional tooltip for Change pencil
We have a global pencil icon tooltip so avoid two tooltips appearing by
removing them from the project page. This also means it's one less place to
update it.

(Bitbake rev: c2021dda953db51f59fb115542ea4a329a854f76)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:24 +00:00
Michael Wood f26c3cd6f1 bitbake: toaster: Add New Build Button feature
This adds a quick access dropdown menu feature for running builds on a
selected project.

[YOCTO #6677]

(Bitbake rev: e92769b43b00764082a7cb2207e314b40510ef62)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:24 +00:00
Michael Wood 5b8a62dad7 bitbake: toaster: libtoaster: Add getProjectInfo utility function
Add a utility function to return a specified project's info/config
This re-uses the existing server code path for the project edit
except that it allows any project id to be used as a parameter

(Bitbake rev: af42ea5f006c5cf55a7c57a42904f412639d261f)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:23 +00:00
Michael Wood fa9206e427 bitbake: toaster: Create libtoaster.js with some utility functions
Replace main.js with libtoaster. This can be a place for common
functionality for toaster. Calling it lib... makes it more obvious as
well as helps with code readability due to the namespacing.

(Bitbake rev: cdf6178ae3675b40afca9f08d491ca1b7e45914e)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:23 +00:00
Alexandru DAMIAN 0b6859cdf3 bitbake: toastergui: layer name correlation
This patch modifies how layers are identified and matched.

Layers were primarely organized by the source of layer information,
and Releases were separated by both layer git branches and originating
source of layer information. This setup prevented mixing layers from
different sources for a certain release, which didn't match the way
people use Yocto Project / bitbake.

This patch brings name-based indentification, where layers with the
same name are assumed to be equivalent, in the sense of being able
to substitute one another. To facilitate this identification to
humans, layers are differentiated by GIT URI instead of layer sources,
which was a rather arbitrary abstraction.

Additional changes include modification to models in order accomodate
for the new data structure, and to config file loading to match
the new toasterconf.json layout.

(Bitbake rev: 4357200aed522ad56cfd84917f877645b83b6a70)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:23 +00:00
Michael Wood 5b0616ad7d bitbake: toaster: skip virtualenv when searching for django apps
If we are using a virtualenv in the current search path we end up trying
to add modules to the django apps list which do not have the correct
load path or are internal to other modules. Fix this by skipping the
virtualenv path.

[YOCTO #6896]

(Bitbake rev: 3f614295d688c33b690f63ff7eb28e6988707919)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:23 +00:00
Belen Barros Pena 2f3e40c5d8 bitbake: toaster: fix file name collision
When toaster is used by multiple users on the same machine,
it is possible that files in /tmp have a name race.

This patch makes sure that the files have unique names.

(Bitbake rev: d4a47bc84f762666a847f1152cc2e75c9ef36092)

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:23 +00:00
Robert Yang c09e56168e bitbake: bitbake-worker: exit normally when SIGHUP
Fixed:
1) Run "bitbake recipe" in the terminal
2) Close the terminal while building
3) $ ps aux | grep bitbake-worker
There will be many processes, and they will keep the resources (e.g.,
memory), and won't exit unless kill or kill -9.

(Bitbake rev: 40d2ae0723de2bf5fee343faafb4afda40546839)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-20 14:15:32 +00:00
Otavio Salvador 3c7cf5dc33 bitbake: bb.codeparser.py: Remove reference for oe.utils.contains
The oe.utils.contains function has been removed from OE-Core metadata
as the references for it has been replaced to use the
bb.utils.contains.

(Bitbake rev: 5cfdebe7a67dccc7552ff80c1ccc970e36d562df)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-20 13:27:52 +00:00
Ross Burton d895e9632d bitbake: depexp: use stateForceShutdown instead of stateStop
This state was renamed in bitbake 12e9d3 but this use of it wasn't changed.

[ YOCTO #5445 ]

(Bitbake rev: 196106100e2dedfacce95be0ee6def94c5a80f27)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-20 13:27:52 +00:00
Brendan Le Foll edaeb89408 bitbake: cooker.py: fix loginfo op being set to an invalid value
loginfo "op" was being set to invalid values in saveConfigurationVar it was
working because set is a python global but append is not. This replaces both
the "op" with strings and removes the crash when calling appendConfigurationVar

(Bitbake rev: 2a8e847de85546d43600a561f9c63aa36bd69222)

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:50 +00:00
Alexandru DAMIAN c5d19aae55 bitbake: toastergui: fix XSS injection points in projects page
We close XSS injection points in Projects page.

* modify the json filter to properly escape HTML tags in strings
* enable $sanitize to automatically sanitize dangerous HTML in
user-supplied input
* clean dangerous characters in targets field, as that field contents
will be directly passed to a shell command

Based on the vulnerability discovered and the patch provided by Michael Wood.

(Bitbake rev: 23c440db9c076ca37e651bdbbdbefee54998e1dc)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:50 +00:00
Alexandru DAMIAN 326d5b1a28 bitbake: toaster: importing angular service
We import angular services ngRoute and
ngSanitize that helps performing user-input
sanitization in order to prevent XSS.

Both services are version 1.2.23.

License is MIT.

(Bitbake rev: 4165895329b3a5e439a38ee749b089637dc502d7)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:50 +00:00
Belen Barros 76f1800f11 bitbake: toastergui: Silly UI fixes
Small fixes to the UI of the project.html and targets.html templates.

In project.html:

* Remove some inline styles and replace them with declarations
in default.css

* Make sure that the 'add' and 'build' buttons in the project
configuration areas have nice, rounded corners

* Add some space between the machine name and the change icon

* Remove the input-prepend class from the build form (we don't
need it)

* Apply the success class to target names in completed builds

* Bold machine and project name in the change notifications to
match all other notifications

* There is a bug in Twitter Boostrap in tooltips inside buttons, so
moving the tooltip in the 'build' button outside the button tag

In targets.html, just add a missing space between the semicolon
and the first layer name in the add layer notification.

(Bitbake rev: 19113c4fe915be7db51ab06dfab5ea0797faea84)

Signed-off-by: Belen Barros <belen.barros.pena@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:50 +00:00
Michael Wood 3a338a2be7 bitbake: toaster: Replace bootstrap js with the correct version
The bootstrap version we are working with is 2.3 not 3

(Bitbake rev: 76c90fe9dcd6fc1aa7e82d9dca0ea9e653d322a1)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:50 +00:00
Alexandru DAMIAN 7b65fa9bbb bitbake: toastergui: changes for the Project page, round 3 of reviews
This patch implements the round 3 of reviews for the Project
page, including fixing the time display, fixing the build list
display, with fade-in and fade-out animations, and various
small layout fixes.

[YOCTO #6587]
[YOCTO #6731]

(Bitbake rev: 09e3ba8f800a03de731b022543cae33a46be17ef)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:49 +00:00
Alexandru DAMIAN abf7551f60 bitbake: toaster: separate the load configuration file command
We separate the load configuration command as to allow
system administrators load toasterconf.json file as part of the
setup process.

[YOCTO #6895]

(Bitbake rev: 3ed596ac4e21a4494fd7f6cd8739d460fd98512f)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:49 +00:00
Michael Wood 6f0496ef55 bitbake: toaster: Update filter count labels when Add/Remove layers
When the user has added/removed a layer but no page reload/requery has
happened we need to update the filter count labels client side.

[YOCTO #6861]

(Bitbake rev: d17e8425de6c609394b9a029afa2dcb455df0b3c)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:49 +00:00
Michael Wood 6cfd8aa148 bitbake: toaster: Fix the table data so that it matches the column order
This fixes the issue where the column is under the wrong table header.

[YOCTO #6684]

(Bitbake rev: 4ef276e379d58130bb50024d7b74b7774fce6fdd)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:49 +00:00
Alexandru DAMIAN 42afeb422e bitbake: toastergui: Various fixes for projects, layers and targets page
This is a combined set of fixes for the project, layers and targets
pages in the project section of toaster.

The fixes correct behaviour and look in various parts of the page,
including submitting XHR commands and updating the DOM with the correct
info.

(Bitbake rev: 96d7738f964784871c928c376cb9fbc9a275cf00)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:48 +00:00
Alexandru DAMIAN 46f1fbe3ab bitbake: adding angular-animate plugin
We add a static copy of the Angular's animate plugin,
version 1.2.23

Licensed under MIT.

(Bitbake rev: 12162fda32af4bc805d6ff5b0348d93befe2f623)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:48 +00:00
Alexandru DAMIAN 78e3a7877b bitbake: toaster: update Release model to pinpoint to specific Branch
We update the release model to pinpoint to specific branch,
instead of holding a branch name that needs to be matched.

This is needed because we move away from mixing branches on different
layer sources.

Various minor changes to models file.

(Bitbake rev: d58aacc69b1832f99758b941803123329e06082d)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:48 +00:00
Alexandru DAMIAN 990fb9ed6c bitbake: toaster: SQL query logging
We add a logger, enabled through the settings.py, that
logs all SQL queries, with timestamp and duration, to console.

This is helpful in profiling the SQL queries.

The facility is disabled by default.

(Bitbake rev: 54fd0a76fa3154adfab5688ecc96963f42cded11)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:48 +00:00
Alexandru DAMIAN 3e9fc8d091 bitbake: toasterui: performance improvements
Improve the performance of data logging in toasterui.
We modify the data queries used to:

 * cache searching in memory
 * insert in bulk (i.e. multiple values per insert, where possible)

On development test rig (networked mysql), on no-op build,
time for data recording is reduced from 4:10 to 1:30 (minutes).

We also improve the logging, so it is easier to detect
toasterui errors.

(Bitbake rev: d42784432f927f58730caf80546c66772e0fec89)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:48 +00:00
Alexandru DAMIAN 0ca70ce37a bitbake: toaster script: webport option and other improvements
We add the "webport=" command line option as to allow starting
the web server on a custom port.

The bitbake server port is now auto-allocated. This is needed
to be able to run multiple toaster environments on a single machine.

We tackle bug 6023 (toaster refusing to start when lock file is present)
by using more specific checks, and automatically recover from
bitbake server down / webserver up error mode.

Command line parameters are now read on both interactive and managed
modes.

The localhost and ssh controllers are updated to work with the modified
toaster launcher script.

[YOCTO #6023]

(Bitbake rev: cd3eb5b051743463cfe51dba97cae4da75420048)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:48 +00:00
Martin Hundebøll 3e068831a1 bitbake: progressbar: use '/usr/bin/env' in shebangs with python
To support yocto on systems with python3 as default version, scripts
should use /usr/bin/env python in the shebang, as this allows the use of
a fake env to mimic python2 as default version.

This patch simply replaces occurrences of #!/usr/bin/python with
 #!/usr/bin/env python and was done with this oneliner:

     git grep -lE '^#!/usr/bin/python' | xargs \
         sed -i 's|/usr/bin/python|/usr/bin/env python|'

(Bitbake rev: 90d9bf1bda282fb5d053a42438a8cfd02475b9cd)

Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 15:25:17 +00:00
Aníbal Limón 6bb241a278 bitbake: fetch/wget: Add latest_versionstring method
Being able to query whether updated versions of a url are available
is useful, not least for the package reporting system. Since such code
is closely linked to the url type and the url itself, the fetcher
makes a locical place to contain this code.

For wget based urls this means taking upstream directory listings
and searching those for later versions, returning those that are
found.

The patch also adds unittests for this function so that if
improvements are made, the original test urls can be used
to evaulate the those changes.

This is based on code from Irina Patru <irina.patru@intel.com>.

(Bitbake rev: a8272e22b7819e0e8afd8e291d276f5f28fc0007)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 15:25:17 +00:00
Aníbal Limón 7587877e5d bitbake: fetch/git: Add latest_versionstring method
Being able to generate a version string representing the most recent git commit
given git is useful, not least for the package reporting system.

This adds in a latest_versionstring method to the git fetcher
which allows users to query the latest version using ls-remote
and filtering the responses.

The patch also adds unittests for this function so that if
improvements are made, the original test urls can be used
to evaulate the those changes.

This is based on code from Irina Patru <irina.patru@intel.com>.

(Bitbake rev: f71c8c0354e87fed80bc845db6728e6e18ce9c4d)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 15:25:17 +00:00
Stefan Müller-Klieser 2f17b2ce7f bitbake: data_smart.py: fix variable splitting at _remove mechanism
If we split variables only at whitespaces, a slipped in tab will render
a value unremovable.

(Bitbake rev: 9f171ea755644ecd9d2b3d7ed13bf8ec09ec917a)

Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-08 11:14:31 +00:00
Richard Purdie 01a61c8e6e bitbake: siggen: Fix shared work checksum mismatch/rebuild issues
Similar to the last shared work task signature bug, we've found another
one. Looking at the improved output of diffsigs in this case:

runtaskdeps changed from [
'autoconf_2.69.bb.do_populate_sysroot:virtual:native',
'gnu-config_20120814.bb.do_populate_sysroot:virtual:native',
'libgcc-initial_4.9.bb.do_patch:virtual:nativesdk'
] to [
'autoconf_2.69.bb.do_populate_sysroot:virtual:native',
'gcc-crosssdk-initial_4.9.bb.do_patch',
'gnu-config_20120814.bb.do_populate_sysroot:virtual:native'
]

so we can get a different task hash since libgcc sorts before gnu-config
and gcc sorts after it. We could do with a way of fixing this, the best
I can come up with is to include a single parent directory. Since
recipes are never at the top of any metadata trees I've seen, this
should suffice for now.

I'm planning to burn the concept of shared work within bitbake
and do something at the metadata level in the 1.8 timeframe as its just
too fragile as things stand and hard to fix well.

(Bitbake rev: d753644c67d163f338f2bdc3d600203e8b1a5734)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-08 11:14:31 +00:00
Richard Purdie 2db07ca8a3 bitbake: siggen: Add computed hash code to verify hash computation to dumpsig
This is useful code to double check the computed checksum value if nothing
else. Might as well have it in tree.

(Bitbake rev: 54ecf96c6f031927ee2410f6efde4e16f19bbf66)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-08 11:14:31 +00:00
Richard Purdie 636dcb84fe bitbake: siggen: Ensure we output if the ordering of runtaskdeps changes
Order of runtaskdeps is important. If the hashes differ we should print output.
This is complicated by shared work where the filenames themselves can differ,
but the checksum should not.

This fixes a case where two different checksums could show no output with
bitbake-diffsigs.

(Bitbake rev: 40c95cb9def282dc88234cd72ff462d7a01e47c1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-08 11:14:31 +00:00
Alexandru DAMIAN 7bd03ac241 bitbake: toastergui: fix invalid build url usage
We need to pass the URL for the build action as javascript
parameter, since the project ID is different for each build,
instead of using the project id of the most-recently-used project.

(Bitbake rev: 35c1de4b05c64ee1c436be2dfbd97dcf9ed9ed71)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-06 16:45:23 +00:00
Alexandru DAMIAN fc75011506 bitbake: toasterui: improvements in data reading
We add improvements in data reading, following
issues discovered in testing.

- elapsed_time is now read from buildstats
- we add safeguards to not fail logging if the build was triggered
with a toaster_brbe configuration, but it's running in
1.6 mode
- added log markups for build finish to let other programs
known when the work is done.

[YOCTO #6833]
[YOCTO #6685]
[YOCTO #6887]

(Bitbake rev: 0b225035cefee3d3713a93f9a432e5e4d4e174f1)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-06 16:45:23 +00:00
Richard Purdie 7105d44d87 bitbake: prserv: Use WAL mode
Ideally, we want the PR service to have minimal influence from
queued disk IO. sqlite tends to be paranoid about data loss and
locks/fsync calls. There is a "WAL mode" which changes the journalling
mechanism and would appear much better suited to our use case.

This patch therefore switches the database to use WAL mode. With this
change, write overhead appears significantly reduced.

(Bitbake rev: 0cdd48261daeb17efc528b5de0ac81c8836e8565)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-06 16:45:23 +00:00
Gary Thomas 5dca71bc2a bitbake: bitbake: Make printed 'runqueue' be consistently capitalized
This has always bothered me:
  NOTE: Preparing runqueue
  NOTE: Executing RunQueue Tasks

This patch changes the messages to be consistent.

(Bitbake rev: 72ac9f9227fbfb4dc8b933b357d21aa0e4060959)

Signed-off-by: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-06 16:45:23 +00:00
Aníbal Limón 25e3e57c55 bitbake: bs4: Add beautifulsoup 4.3.2 to assist the fetcher
Added Beautifulsoup module because fetch/wget latest_versionstring
method depends on it.

This provides support to fetch/wget.py module for search new package
versions in upstream sites.

(Bitbake rev: 4626c9b77e5eded97507b6f9ca0d891f9a54bb8a)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-06 16:45:23 +00:00
Fredrik Svensson bc6330cb7f bitbake: fetch2/git: Allow other namespaces than refs/heads to be searched.
This makes it possble to fetch Gerrit review references which are
normally stored under refs/changes.

Please disregard previous patch with the same topic.

(Bitbake rev: 268e9c0c6830e8e621c418f20c2ca12dc840e48b)

Signed-off-by: Fredrik Svensson <fredrik.svensson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-06 16:45:22 +00:00
Richard Purdie 2380ebecd1 bitbake: prserv/serv: Ensure sync happens in the correct thread
The sync/commit calls are happening in the submission thread which can
race against the handler. The handler may start new transactions which
then causes the submission thread to error with "cannot start a
transaction within a transaction".

The fix is to move the calls to the correct thread.

(Bitbake rev: 92e128a0e331e563cfe48827e95939041c16c88e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-04 15:00:19 +00:00
Alexandru DAMIAN f19b4e995e bitbake: bitbake: clarify startup message
Fix the startup message by making clear which
server runs on which port.

(Bitbake rev: 26d601ab2a677a422bab425696a2cf6357ff3576)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:52 +00:00