]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/log
thirdparty/openembedded/openembedded-core-contrib.git
9 years agofetch2/hg: Include missing errno import
Logan Buchy [Thu, 15 Oct 2015 07:42:27 +0000 (00:42 -0700)] 
fetch2/hg: Include missing errno import

errno.ENOENT checked if deletion of the fullmirror fails.
Exception was thrown since module not imported

Signed-off-by: Logan Buchy <logan.buchy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocooker: normalize build targets
Ed Bartosh [Thu, 15 Oct 2015 08:37:40 +0000 (11:37 +0300)] 
cooker: normalize build targets

BuildStarted event not fully represents build tasks for
the targets. If -c option is used to specify default task
it's not included into the event.

Made build targets to always look as <target>:do_<task>.
Consider default task (do_build or specified by -c command
line option) when normalizing.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Allow any text input to machine configuration variable
Michael Wood [Fri, 16 Oct 2015 09:18:29 +0000 (10:18 +0100)] 
toaster: Allow any text input to machine configuration variable

Allow any text input to the machine variable; as we may not have discovered
all the available machines until after a build.

[YOCTO #8418]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: exit or return depending on the mode
Ed Bartosh [Thu, 15 Oct 2015 16:34:17 +0000 (09:34 -0700)] 
toaster: exit or return depending on the mode

When toaster script is sourced 'return' should be used as
using 'exit' will cause script to exit the shell and close terminal
window. If script is called 'exit' should be used. Otherwise shell
will throw and error:
  return: can only `return' from a function or sourced script

Used 'return' or 'exit' depending on the toaster mode using
TOASTER_MANAGED variable.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: set TOASTER_MANAGED variable
Ed Bartosh [Thu, 15 Oct 2015 16:34:16 +0000 (09:34 -0700)] 
toaster: set TOASTER_MANAGED variable

Set TOASTER_MANAGED to 1 if toaster is run as a script.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: get rid of SRCFILE
Ed Bartosh [Thu, 15 Oct 2015 16:34:15 +0000 (09:34 -0700)] 
toaster: get rid of SRCFILE

Used TOASTER variable instead of SRCFILE as they're
essentially the same.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: use path to the script to guess config path
Ed Bartosh [Thu, 15 Oct 2015 16:34:14 +0000 (09:34 -0700)] 
toaster: use path to the script to guess config path

Used $TOASTER variable(path to the toaster script) instead of
current directory name to get path to the toasterconf.json

This way script should work in both modes and it doesn't depend
on the current directory.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Guard against builds with no targets
Elliot Smith [Thu, 15 Oct 2015 12:45:15 +0000 (15:45 +0300)] 
toaster: Guard against builds with no targets

Although this probably can't happen in practice (builds without
targets), this constraint is not currently enforced in the data model.

In the unlikely event that a build has no target (e.g. in test cases),
this causes a template rendering error.

Rather than rework the data model, add a guard to the template
to prevent it from rendering the target name if there are no
targets associated with the build.

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Remove Toaster exceptions section of build dashboard
Elliot Smith [Thu, 15 Oct 2015 12:45:14 +0000 (15:45 +0300)] 
toaster: Remove Toaster exceptions section of build dashboard

Fatal build errors were displayed as exceptions, and highlighted
with less severity than they deserved.

Roll back to treating Toaster exceptions as errors by removing
the toaster_exceptions member on Build objects and displaying
EXCEPTION events in the errors section on the dashboard.

[YOCTO #8320]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Record critical errors
Elliot Smith [Thu, 15 Oct 2015 12:45:13 +0000 (15:45 +0300)] 
toaster: Record critical errors

Critical errors (where a build failed for reasons of
misconfiguration, such as a machine being specified which is not
in a project's layers) were being ignored (only log records
up to ERROR level were being logged to Toaster's db). This meant that
the build would fail but would not correctly report why.

Add support for CRITICAL error levels to the LogMessage model,
include errors at this level in the errors property for a build,
and show errors at this level in the build dashboard.

[YOCTO #8320]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Test that exception isn't thrown by project page
Elliot Smith [Wed, 14 Oct 2015 14:43:45 +0000 (15:43 +0100)] 
toaster: Test that exception isn't thrown by project page

Add a test which checks that an exception is no longer thrown
for the /toastergui/project/X page for the default project.

Note that we still get a spinning dialogue box on this page
because the default project has no configuration to display,
but at least it doesn't fail altogether.

[YOCTO #8277]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Check whether buildrequest exists before using it
Elliot Smith [Wed, 14 Oct 2015 14:43:44 +0000 (15:43 +0100)] 
toaster: Check whether buildrequest exists before using it

Builds initiated from the command line don't have a buildrequest
associated with them. The build.buildrequest association is
only added if a build is triggered from toaster.

Some of the code for displaying the status of a build refers
to build.buildrequest without checking whether it has been set,
which causes an error to be thrown.

Add a guard to check whether the buildrequest has been set.

[YOCTO #8277]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Always run bldcontrol migrations
Elliot Smith [Wed, 14 Oct 2015 14:43:43 +0000 (15:43 +0100)] 
toaster: Always run bldcontrol migrations

The toaster startup script conditionally migrates the database
tables depending on whether you are in managed mode or not. This
means that if you are in analysis mode, some of the bldcontrol*
database tables used by managed mode are not available.

As a consequence, some of the code in toaster which refers to
those tables can break in analysis mode, as there's no clean
isolation of the two modes.

To prevent this from happening, always run the migrations for
managed mode and create the bldcontrol* tables, even if in
analysis mode.

Also clean up the function which starts up toaster so the
logic is easier to follow.

[YOCTO #8277]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: buildinfohelper Detect command line builds
Michael Wood [Wed, 14 Oct 2015 09:09:12 +0000 (10:09 +0100)] 
toaster: buildinfohelper Detect command line builds

When we're building using toaster as just a listener to bitbake
(analysis mode) we need to handle the case where the toaster configuration data
isn't present so we don't need to try and update the existing information.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Disable add layer button when input is empty
Belen Barros Pena [Wed, 14 Oct 2015 12:43:18 +0000 (13:43 +0100)] 
toaster: Disable add layer button when input is empty

The 'add layer' button in the project configuration page
is enabled when you select a layer from the type ahead.
However, if you delete the layer name, the 'add layer'
button remains enabled, and if you click it, the last
selected layer from the type ahead will be added to the
project.

It is probably better to disable the 'add layer' button
when the input field is empty.

[YOCTO #8449]

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Have 'Version' next to recipe name
Belen Barros Pena [Wed, 14 Oct 2015 12:20:50 +0000 (13:20 +0100)] 
toaster: Have 'Version' next to recipe name

In all Toaster tables we show the version next to the recipe
or package names, with one exception: the recipes table in
the layer details page, where we are showing the version
next to the recipe description.

This patch moves the version column next to the recipe name,
for consistency with all other Toaster tables.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Improve directory structure layout
Belen Barros Pena [Wed, 14 Oct 2015 12:12:14 +0000 (13:12 +0100)] 
toaster: Improve directory structure layout

File names in the directory structure often wrap
due to big indenting for nested files and directories,
unnecessary width in certain columns, and not using
colspan when the symlink and package cells are empty.
The wrapping makes the table harder to read.

This patch reduces the amount of indenting, limits the
width of the 'Size', 'Permissions', 'Owner' and 'Group'
columns, and sets colspan to use the white space of the
symlink and package names when empty.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: importlayer Update property names for importlayer api calls
Ed Bartosh [Wed, 14 Oct 2015 11:10:10 +0000 (14:10 +0300)] 
toaster: importlayer Update property names for importlayer api calls

Update the property names used in checking for existing layers. The
server side API changed but not all references were updated.

[YOCTO #8300]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Fix missing tooltips from layers on project configuration page
Michael Wood [Tue, 13 Oct 2015 08:58:49 +0000 (09:58 +0100)] 
toaster: Fix missing tooltips from layers on project configuration page

Re-enable the layer tooltips on the project configuration page.
This adds the required fields to the API used for the layer dependencies
to be able to show the metadata needed.

Also fixes link hrefs which were missing in the add layers confirmation
dialog (bug 8251).

[YOCTO #8295]
[YOCTO #8251]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Fix broken test case
Ed Bartosh [Thu, 1 Oct 2015 09:41:26 +0000 (10:41 +0100)] 
toaster: Fix broken test case

Fixed test_show_tasks_in_projectbuilds broken by latest changes in
project build view.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: exclude recipes with empty names
Ed Bartosh [Thu, 1 Oct 2015 21:19:57 +0000 (14:19 -0700)] 
toaster: exclude recipes with empty names

Modified get_all_compatible_recipes function to exclude recipes
with empty names from the result queryset. This should stop UI
to show recipes with empty names in compatible recipes page.

[YOCTO #7969]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: delete recipe if it can't be saved
Ed Bartosh [Thu, 1 Oct 2015 21:19:56 +0000 (14:19 -0700)] 
toaster: delete recipe if it can't be saved

Due to Recipe model constraints some recipes can't be
saved. However, they still can create incomplete records in
the database. This causes all sorts of errors when Toaster
operates with those objects. Removing them should fix those
issues.

[YOCTO #7969]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Remove project name from latest project builds
Belen Barros Pena [Fri, 2 Oct 2015 13:43:26 +0000 (14:43 +0100)] 
toaster: Remove project name from latest project builds

The 'latest builds' list in the project builds page does not
need to show the project name, since it lists only builds
for the selected project.

This patch removes the redundant project name.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: test get_alldeps API
Ed Bartosh [Fri, 2 Oct 2015 18:05:16 +0000 (11:05 -0700)] 
toaster: test get_alldeps API

Added test case to test Layer_Version.get_alldeps API.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: fix orm tests
Ed Bartosh [Fri, 2 Oct 2015 18:05:15 +0000 (11:05 -0700)] 
toaster: fix orm tests

Cleaned up and fixed orm tests. Removed test_build_layerversion as
it's not needed due to changed compatible_layer_versions API.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: fix NameError
Ed Bartosh [Fri, 2 Oct 2015 18:05:14 +0000 (11:05 -0700)] 
toaster: fix NameError

Fixed exception: NameError: global name 'DoesNotExist' is not defined

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: use get_alldeps in layerdetails renderer
Ed Bartosh [Fri, 2 Oct 2015 18:05:13 +0000 (11:05 -0700)] 
toaster: use get_alldeps in layerdetails renderer

Used Layer_Version.get_alldeps api in layerdetails template
renderer to get list of layer dependencies.

[YOCTO 8004]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: implement API to get full list of deps
Ed Bartosh [Fri, 2 Oct 2015 18:05:12 +0000 (11:05 -0700)] 
toaster: implement API to get full list of deps

Implemented Layer_Version.get_alldeps API to recursively get
full list of dependencies for the layer. Dependencies that are
already in the project are filtered out from the result.
Result list of Layer_Version objects is sorted by layer name
for UI to look consistent.

This API is going to be used to show amount and list of
dependencies for the layer in the list of compatible layers
for the project.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Don't descend into directories for cached_layers
Michael Wood [Fri, 9 Oct 2015 10:28:58 +0000 (11:28 +0100)] 
toaster: Don't descend into directories for cached_layers

As toaster makes use of clones of itself we have a mechanism to just
clone the current checkout and use that as a basis for the git clone for
the layers inside. For instance, in poky, if we're running in that directory,
we don't ever want to change the current checkout so we make a copy of
ourselves to do this work in.

This steps through cached_layers and previously-traversed directories
inside the current checkout to find any pre-existing checkouts.

This was ending up traversing too many directories down, so remove
the traverse and only deal with the current directory.

[YOCTO #8463]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Update JS unit tests
Michael Wood [Fri, 9 Oct 2015 09:32:43 +0000 (10:32 +0100)] 
toaster: Update JS unit tests

Update JS unit tests.
- Expand the add remove layer check to make sure that the layer is
  actually added to the project.
- Remove some unused vars
- Make sure that the layers/project ids will always exist at the point
  of running the test.
- Add the missing typeahead input fields to the dom to fix the failing
  typeahead test.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Fix stale layer state buttons
Michael Wood [Fri, 9 Oct 2015 09:32:42 +0000 (10:32 +0100)] 
toaster: Fix stale layer state buttons

Move the "is available to the project" state computation to the template
for the Layer add/remove buttons, Recipe build/Add layer as done for the
Package add/remove. This is more reliable as we can get an inconsistent
state on the front end JS as there are many opportunities for hitting
out of date project information.

[YOCTO #8294]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: tables Add the recipe filter back into the Recipe table
Michael Wood [Fri, 9 Oct 2015 09:32:41 +0000 (10:32 +0100)] 
toaster: tables Add the recipe filter back into the Recipe table

Add the "Is recipe currently available in the project" filter back to
the Recipe table which was removed when we had intermediate
AvailableRecipe tables.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Fix typo in returning pk list of layer versions in current project
Michael Wood [Fri, 9 Oct 2015 09:32:40 +0000 (10:32 +0100)] 
toaster: Fix typo in returning pk list of layer versions in current project

This was accidentally returning the primary key of the ProjectLayer
rather than the ProjectLayer.Layer_Version.pk

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: layerdetails update build recipe button class name
Michael Wood [Fri, 9 Oct 2015 09:32:39 +0000 (10:32 +0100)] 
toaster: layerdetails update build recipe button class name

Update the class name which we are using for the recipe build button.
This fixes a regression in the buttons being enabled/disabled when
adding and removing the layer being viewed from the project.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Hide "Download build log" button if log doesn't exist
Elliot Smith [Wed, 7 Oct 2015 10:20:15 +0000 (13:20 +0300)] 
toaster: Hide "Download build log" button if log doesn't exist

Our builds pages show all builds, but also include build requests
which may have resulted in a build failure, before the build
started (e.g. at the recipe parsing stage).

In such cases, the BuildStarted event is not captured by Toaster,
so we have no idea where the log file for the failed build is.

The result is that a build is shown by the Toaster UI /builds/ pages,
but it is really a pretend build which never went beyond being a
build request, and which has no associated log file. In turn, this
breaks the "Download build log" button on the build dashboard,
as there's no log file associated with the build.

Fix this by hiding the "Download build log" button for builds
which don't have a cooker_log_path.

[YOCTO #8373]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: fix naming for clone directory
Ed Bartosh [Wed, 7 Oct 2015 14:31:20 +0000 (15:31 +0100)] 
toaster: fix naming for clone directory

Toaster uses git url and branch to make a clone directory
name. Current code leaves '@' and '%' characters unchanged,
which can cause generation of wrong directory names.

Fixed this issue by replacing '@' and '%' with underscore.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: buildinfohelper Skip packages we have no build info about
Michael Wood [Wed, 7 Oct 2015 13:55:08 +0000 (14:55 +0100)] 
toaster: buildinfohelper Skip packages we have no build info about

If there are more packages listed as installed than we know about from
bitbake, and therefore have insufficient information to be able to
create a Toaster Package object then skip it. Also handle the case where
a dependency references such a package.

Also clarify the error logging.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: buildinfohelper associate build data with built_recipe
Michael Wood [Wed, 7 Oct 2015 13:55:07 +0000 (14:55 +0100)] 
toaster: buildinfohelper associate build data with built_recipe

Make sure we associate build data with the built recipe rather than
toaster's configuration copy of the recipe.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: remove bashisms so script works in dash as well
brian avery [Wed, 7 Oct 2015 12:17:36 +0000 (15:17 +0300)] 
toaster: remove bashisms so script works in dash as well

[YOCTO #8217]

Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: get rid of interactivity in bldcontrol
brian avery [Wed, 7 Oct 2015 12:17:35 +0000 (15:17 +0300)] 
toaster: get rid of interactivity in bldcontrol

removed layer dir questions and base off TOASTER_DIR

removed build dir questions and base off TOASTER_DIR

base configuration file off of TOASTER_CONF

fixed some pylint issues

[YOCTO #8217]

Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: check for configuration file and exit if not found
brian avery [Wed, 7 Oct 2015 12:17:34 +0000 (15:17 +0300)] 
toaster: check for configuration file and exit if not found

[YOCTO #8217]

Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: remove layer and build dir interactive questions
brian avery [Wed, 7 Oct 2015 12:17:33 +0000 (15:17 +0300)] 
toaster: remove layer and build dir interactive questions

added TOASTER_CONF env var for toaasterconf.json

added TOASTER_DIR env var for working dir

added bugfix so WEB_PORT env variable is honored

Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: removed superuser question from startup
brian avery [Wed, 7 Oct 2015 12:17:32 +0000 (15:17 +0300)] 
toaster: removed superuser question from startup

added comment explaining how to create one later

Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: orm Machines filter don't pass self in as parameter
Michael Wood [Wed, 7 Oct 2015 03:21:25 +0000 (20:21 -0700)] 
toaster: orm Machines filter don't pass self in as parameter

Fix typo don't pass self in as a parameter, this evaluated to true
giving the wrong results meaning the machines typeahead did not return
valid results.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Rationalise mimetype guessing to fix artifact downloads
Elliot Smith [Wed, 7 Oct 2015 03:05:22 +0000 (20:05 -0700)] 
toaster: Rationalise mimetype guessing to fix artifact downloads

Artifact download links were broken because the function to
get the mimetype for the artifact was incorrectly using the
underlying mimetype library. The function was also attached
to the build environment controller, which was unnecessary, as
we only support local controllers anyway.

Remove the mimetype getter on the build environment and
use the one in the view code instead. This works correctly
and prevents the download error from occurring.

[YOCTO #8369]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Use Python's mimetypes module
Elliot Smith [Wed, 7 Oct 2015 03:05:21 +0000 (20:05 -0700)] 
toaster: Use Python's mimetypes module

filemagic is used to guess the mimetype of files when a user
requests a download. However, this adds a dependency on an
external library.

Python does have a mimetypes module, though this guesses the
mimetype rather than doing anything clever with the actual
file content. But for our purposes, it's more than adequate.
(NB Django also uses this module when serving static files.)

Use this instead of relying on any external code, and remove
the filemagic dependency.

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: display warnings for bad "IMAGE_FSTYPES" values
David Reyna [Tue, 6 Oct 2015 15:43:30 +0000 (16:43 +0100)] 
toaster: display warnings for bad "IMAGE_FSTYPES" values

Display warning message for IMAGE_FSTYPES when no value is selected or
when the filter does not have any matches

[YOCTO #8126]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Set default columns in recipes tables
Belen Barros Pena [Tue, 6 Oct 2015 13:31:50 +0000 (14:31 +0100)] 
toaster: Set default columns in recipes tables

The compatible image recipes and software recipes tables
show pretty much all their columns by default. That's a few
too many columns. The default columns in both tables should
be: recipe, version, description, layer and build.

This patch sets the above as the default columns. It also
changes the table heading 'Recipe Version' to just 'Version',
which is shorter and self-explanatory.

[YOCTO #8421]

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Comment out broken sorting and filters
Belen Barros Pena [Tue, 6 Oct 2015 13:20:44 +0000 (14:20 +0100)] 
toaster: Comment out broken sorting and filters

YOCTO #8131 records that the sorting by 'errors', 'warnings'
and 'time', and the filtering by 'errors' and 'warnings',
are broken in the 'all builds' and 'project builds' pages.

To avoid exposing broken functionality to users, comment
out the sorting and filtering in those columns until we
we have a fix for YOCTO #8131.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Don't HTTP cache ToasterTable responses
Elliot Smith [Mon, 5 Oct 2015 11:08:32 +0000 (12:08 +0100)] 
toaster: Don't HTTP cache ToasterTable responses

Django allows generated pages to be cached by default by the
browser. This can result in stale data displaying for some pages.

Instead, disable HTTP caching of ToasterTable responses, so that
each time a ToasterTable view is displayed, its data is
refreshed. This carries a performance penalty, but ensures that
ToasterTable views (e.g. compatible layers) are correctly
refreshed if the user navigates their history with forward/back.

[YOCTO #7660]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Don't add new history entries when table data loads
Elliot Smith [Mon, 5 Oct 2015 11:08:31 +0000 (12:08 +0100)] 
toaster: Don't add new history entries when table data loads

When ToasterTable data is loaded into the UI, a new entry is
added to the browser history. This means that pressing the back
button appears to have no effect, as you end up at the same page,
possibly with slightly different data.

Instead, use replaceState(), so that the browser history doesn't
grow, but the page context still gets updated.

[YOCTO #7660]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: use meaningful logging levels
Ed Bartosh [Mon, 5 Oct 2015 09:43:18 +0000 (10:43 +0100)] 
toaster: use meaningful logging levels

Changed logging levels to more appropriate ones.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: ignore ReachableStamps event
Ed Bartosh [Mon, 5 Oct 2015 09:43:17 +0000 (10:43 +0100)] 
toaster: ignore ReachableStamps event

Added ReachableStamps event to the list of known events to
ignore. This should stop toaster throwing error message:
ERROR: Unknown event: <bb.event.ReachableStamps>

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake/lib: Update version to 1.28.0
Richard Purdie [Thu, 1 Oct 2015 14:16:41 +0000 (15:16 +0100)] 
bitbake/lib: Update version to 1.28.0

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agosiggen: Make it clear why nostamp tasks signatures don't match
Richard Purdie [Wed, 30 Sep 2015 13:55:56 +0000 (14:55 +0100)] 
siggen: Make it clear why nostamp tasks signatures don't match

If you run bitbake-diffsigs against two differing sigdata files from
nostamp tasks it shows no difference despite the differing checksum.

Change the code so this shows up as a nostamp 'taint' and at least
makes the issue clearer to the end user.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorunqueue: Add handling of virtual/xxx provider mappings
Richard Purdie [Wed, 30 Sep 2015 13:29:01 +0000 (14:29 +0100)] 
runqueue: Add handling of virtual/xxx provider mappings

This firstly prints debug messages which show how bitbake decided to resolve
the virtual/xxx providers which is useful for debugging.

If the siggen has a tasks_resolved() method, it calls this, passing in
the mappings, allowing that to do things with the resolved names.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotaskdata: Add a function to return the virtual/ mapping data
Richard Purdie [Wed, 30 Sep 2015 13:28:21 +0000 (14:28 +0100)] 
taskdata: Add a function to return the virtual/ mapping data

When building an execution task graph, bitbake does resolve virtual/xxx
namespaces into specific providers. This data isn't exported anywhere
however.

This adds a function so that runqueue can at least retrieve this data
which can then be used by the system.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agocookerdata: Rename BBPKGS -> BBTARGETS
Richard Purdie [Tue, 29 Sep 2015 13:07:59 +0000 (14:07 +0100)] 
cookerdata: Rename BBPKGS -> BBTARGETS

BBPKGS is a confusing name from before we tried to straighten out our
terminology. Its also a mostly unknown variable that isn't in wide use.

I've been asked about it recently and before people start relying more
heavily on it, I'd like to rename it BBTARGETS which better describes
what it does. Its not currently in the manuals, I'd prefer to document
it under the better name. I've not provided any migration path for the
variable since I believe its unused currently.

It allows the targets to built to be specified from a conf file in
addition to those on the commandline.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake-worker: Guard against multiprocessing corruption of event data
Richard Purdie [Tue, 29 Sep 2015 08:28:24 +0000 (09:28 +0100)] 
bitbake-worker: Guard against multiprocessing corruption of event data

In the forked child, we may use multiprocessing. There is only one event
pipe to the worker controlling process and if we're unlucky, multiple
processes can write to it at once corrupting the data by intermixing it.

We don't see this often but when we do, its quite puzzling. I suspect it
only happens in tasks which use multiprocessng (do_rootfs, do_package)
and is much more likely to happen when we have long messages, usually many
times PAGE_SIZE since PAGE_SIZE writes are atomic. This makes it much more
likely within do_roofs, when for example a subprocess lists the contents
of a rootfs.

To fix this, we give each child a Lock() object and use this to serialise
writes to the controlling worker.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: move clones into subdirectory
Ed Bartosh [Wed, 23 Sep 2015 22:34:58 +0000 (15:34 -0700)] 
toaster: move clones into subdirectory

By default Toaster clones layers to the same level where
poky clone is. This can look messy if a lot of layers are
used for Toaster builds.

Moving them into _toaster_clones/ subdirectory should make
directory structure looking cleaner. It also safer to isolate
toaster clones from what user might create.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: make clone directory name unique
Ed Bartosh [Wed, 23 Sep 2015 22:34:57 +0000 (15:34 -0700)] 
toaster: make clone directory name unique

Changed naming scheme for clone directory. Used full git url and branch to
make it unique. This should fix the issue with using the same git
repository, but different protocols, e.g. git://some.git.repo and
http://some.git.repo.

[YOCTO #8101]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: fix reimporting module
Ed Bartosh [Wed, 23 Sep 2015 22:34:56 +0000 (15:34 -0700)] 
toaster: fix reimporting module

removed second 'import re' from localhostbecontroller.py

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: fix bug in resetting git repository
Ed Bartosh [Wed, 23 Sep 2015 22:34:55 +0000 (15:34 -0700)] 
toaster: fix bug in resetting git repository

git reset --hard should be given either commit id or
origin/<ref name> to work properly. Without this fix git will
complain that origin/<commit id> does not exist.

[YOCTO #7505]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: use git reset --hard instead of rebase
Ed Bartosh [Wed, 23 Sep 2015 22:34:54 +0000 (15:34 -0700)] 
toaster: use git reset --hard instead of rebase

Replaced 'git checkout <ref> && git rebase' with 'git reset --hard' as
with git checkout repository ends up with detached HEAD. Rebase makes
things even worse as it can cause conflicts. git reset --hard resets
repository to the required state in a most straightforward and
reliable way.

[YOCTO #7505]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: don't use --single-branch when cloning
Ed Bartosh [Wed, 23 Sep 2015 22:34:53 +0000 (15:34 -0700)] 
toaster: don't use --single-branch when cloning

git clone --single-branch works only with ref names. It fails if
commit sha1 is set in layer configuration with this error:
fatal: Remote branch <commit sha1> not found in upstream origin

Cloning repository without using --single-branch should work for
refs and commit sha1.

[YOCTO #7505]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoutils: only add layer once in edit_bblayers_conf()
Markus Lehtonen [Thu, 24 Sep 2015 13:02:23 +0000 (16:02 +0300)] 
utils: only add layer once in edit_bblayers_conf()

Prevent edit_bblayers_conf() from adding layer(s) multiple times. This
happened when BBLAYERS variable was "listed" multiple times in
bblayer.conf - i.e. the configuration was split into multiple separate
assignments.

[YOCTO #8316]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: display most recent builds for projects
David Reyna [Tue, 29 Sep 2015 07:15:19 +0000 (08:15 +0100)] 
toaster: display most recent builds for projects

Display the most recent builds in the given project's build page.

[YOCTO #8186]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: orm remove the complicated querying on the ORM
Michael Wood [Tue, 29 Sep 2015 09:50:10 +0000 (10:50 +0100)] 
toaster: orm remove the complicated querying on the ORM

We no longer need to compute each layer_version and all the recipes
which belong to this.

[YOCTO #8147]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoRevert "bitbake: toaster: don't re-create Target objects"
Michael Wood [Tue, 29 Sep 2015 04:45:31 +0000 (21:45 -0700)] 
Revert "bitbake: toaster: don't re-create Target objects"

This delete followed up the foreign keys and deleted things that were
not expected to be deleted.

This reverts commit 08000eb27eb8413686fb2c8daf14d234a8bff83a.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: buildinfohelper Create a copy of the built layer and recipe
Michael Wood [Tue, 29 Sep 2015 04:45:30 +0000 (21:45 -0700)] 
toaster: buildinfohelper Create a copy of the built layer and recipe

Create a copy of the built layer and the recipes associated with it.
This is so that the user can view the historical information about a
build. i.e. a snapshot of the layer version and artifacts produced at
that build.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: tables show all recipes in the layerdetails even duplicates
Michael Wood [Tue, 29 Sep 2015 04:45:29 +0000 (21:45 -0700)] 
toaster: tables show all recipes in the layerdetails even duplicates

For some layers we have multiple recipes for the same software with
differing versions. Change to showing all versions and add a version
column to the table instead.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Prioroitise the layer more generic vcs reference over the sha
Michael Wood [Tue, 29 Sep 2015 04:45:28 +0000 (21:45 -0700)] 
toaster: Prioroitise the layer more generic vcs reference over the sha

When we do a build we update the last commit value that the layer was built at
However in future builds we do want to use the named reference rather
than the commit sha, e.g. master/fido

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Create a relationship between build information and toaster layers
Michael Wood [Tue, 29 Sep 2015 04:45:27 +0000 (21:45 -0700)] 
toaster: Create a relationship between build information and toaster layers

Previously this layer relationship was done by trying to match path
information that came back to the buildinfohelper with trying to query for
data in toaster's layers table. This rarely matched due to the lose coupling.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Special case the openembedded-core layer to avoid duplicates
Michael Wood [Tue, 29 Sep 2015 04:45:26 +0000 (21:45 -0700)] 
toaster: Special case the openembedded-core layer to avoid duplicates

If the openembedded-core layer is specified in the toasterconf we need
to treat it differently because we may also get this layer either from
the layerindex source or I can also be provided locally.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Add test cases for new Image customisation features
Ed Bartosh [Tue, 29 Sep 2015 04:45:25 +0000 (21:45 -0700)] 
toaster: Add test cases for new Image customisation features

- Adds tests for new ToasterTables
- Adds tests for new ReST API

co-author: Elliot Smith <elliot.smith@intel.com>
           Michael Wood <michael.g.wood@intel.com>

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Add Image customisation frontend feature
Michael Wood [Tue, 29 Sep 2015 04:45:24 +0000 (21:45 -0700)] 
toaster: Add Image customisation frontend feature

Add the Image customisation front end feature to Toaster.
Caveat - This feature is currently in development and should not be
enabled by default.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Add ToasterTables for Image customisation feature
Michael Wood [Tue, 29 Sep 2015 04:45:23 +0000 (21:45 -0700)] 
toaster: Add ToasterTables for Image customisation feature

- Split up the recipes tables into Image recipes and Software Recipes
- Add CustomImageRecipe table
- Add SelectPackagesTable table
- Add NewCustomImagesTable table

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Add new ReST API for Image Customisation feature
Ed Bartosh [Tue, 29 Sep 2015 04:45:22 +0000 (21:45 -0700)] 
toaster: Add new ReST API for Image Customisation feature

Implemented xhr_customrecipe API. To create a custom recipe from a
base recipe.
Implemented xhr_customrecipe_packages API to add/remove packages
to/from custom recipe.

co-authored see Signed-off-by

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Fix indentation of jsunittests view
Michael Wood [Tue, 29 Sep 2015 04:45:21 +0000 (21:45 -0700)] 
toaster: Fix indentation of jsunittests view

Fix indentation to 4 spaces

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: implement decorator for REST responses
Ed Bartosh [Tue, 29 Sep 2015 04:45:20 +0000 (21:45 -0700)] 
toaster: implement decorator for REST responses

Implemented xhr_response decorator to decorate responses
from REST methods into Django HttpResponse objects.

This decorator should reduce amount of repeated code in
REST methods and make them more readable.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: add toggle for enabling image customisation feeature
Michael Wood [Tue, 29 Sep 2015 04:45:19 +0000 (21:45 -0700)] 
toaster: add toggle for enabling image customisation feeature

This feature is currently under heavy development and should be used
with caution.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Add CustomImageRecipe model
Michael Wood [Tue, 29 Sep 2015 04:45:18 +0000 (21:45 -0700)] 
toaster: Add CustomImageRecipe model

This model lists custom image recipes for the project.
It is populated when new custom image is created.
It holds reference to the base recipe and list of packages
included into custom image.

For CustomImageRecipes the packages will be copied in and
therefore not associated with a build so Remove the requirement
for the package to have a Build.

co-author: Ed Bartosh <ed.bartosh@linux.intel.com>

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: ToasterTable remove unused class definition
Michael Wood [Tue, 29 Sep 2015 04:45:17 +0000 (21:45 -0700)] 
toaster: ToasterTable remove unused class definition

Remove ToasterTemplateView as this isn't used by anything.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: add nocache option to the ToasterTable widget
Michael Wood [Tue, 29 Sep 2015 04:45:16 +0000 (21:45 -0700)] 
toaster: add nocache option to the ToasterTable widget

Useful for skipping the cache mechanism when debugging.
Simply append nocache=true to the end of the url with the table in
it.
Also adds a debug message if the table is using cached data.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: widgets ToasterTable Add more info to search field exception
Michael Wood [Tue, 29 Sep 2015 04:45:15 +0000 (21:45 -0700)] 
toaster: widgets ToasterTable Add more info to search field exception

If we get a search fields exception then also print out the model name

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: widgets ToasterTable add logger to notify when cache hit
Michael Wood [Tue, 29 Sep 2015 04:45:14 +0000 (21:45 -0700)] 
toaster: widgets ToasterTable add logger to notify when cache hit

Useful for debugging to remind you if you're hitting a cache or not

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: create custom layer and recipes for Image customisation
Ed Bartosh [Tue, 29 Sep 2015 04:45:13 +0000 (21:45 -0700)] 
toaster: create custom layer and recipes for Image customisation

When building customised recipes toaster creates custom layer directory
and puts layer.conf and custom recipes to it.

[YOCTO #8075]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: tables Move the title and name into the widget
Michael Wood [Tue, 29 Sep 2015 04:45:12 +0000 (21:45 -0700)] 
toaster: tables Move the title and name into the widget

For historical reasons this was being set in the urls definition. We
can set this in the actual definition of the table and defaults in the
widget.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: make a workaround for old style index
Ed Bartosh [Tue, 29 Sep 2015 04:45:11 +0000 (21:45 -0700)] 
toaster: make a workaround for old style index

For a new style indexes 'inherits' field is used to determine if
recipe is an image recipe.

As old style indexes don't have 'inherits' field this can be
guessed from recipe name. Let's consider recipe an image recipe
if recipe name contains '-image-'.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoprserv/serv.py: Better messaging when starting/stopping the server with port=0
Leonardo Sandoval [Thu, 10 Sep 2015 11:59:45 +0000 (11:59 +0000)] 
prserv/serv.py: Better messaging when starting/stopping the server with port=0

When starting the server using port=0, the server actually starts with a
different port, so print a message with this new value. When stopping the
server with port=0, advise the user which ports the server is listening to,
so next time it tries to close it, user can pick up the correct one.

[YOCTO #8560]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoprserv/serv: Close the DB connection out of class destructor
Leonardo Sandoval [Wed, 23 Sep 2015 13:39:27 +0000 (13:39 +0000)] 
prserv/serv: Close the DB connection out of class destructor

When launching the PR server daemon, the PRData __del__ function was being
called (no reason found yet) where the DB connection closed, thus following
PR updates were not getting into the DB. This patch closes the connection
explicitly, not relaying on the __del__ function execution.
Closing the connection in turn causes all WAL file transactions to be moved
into the database (checkpoint), thus effectively updating the database.

[YOCTO #8215]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agoprserv/serv: Start/Stop daemon using ip instead of host
Leonardo Sandoval [Tue, 15 Sep 2015 14:59:38 +0000 (14:59 +0000)] 
prserv/serv: Start/Stop daemon using ip instead of host

In cases where hostname is given instead of an IP (i.e. localhost
instead of 127.0.0.1) when stopping the server with bitbake-prserv --stop,
the server shows a misleading message indicating that the daemon was not
found, where it is actually stopped. This patch converts host to IP values
before starting/stopping the daemon, so it will always work on IP, not on
hostnames, avoiding problems like the latter.

[YOCTO #8258]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: start script warning text formatting small improvement
Cristian Iorga [Fri, 18 Sep 2015 14:46:28 +0000 (15:46 +0100)] 
toaster: start script warning text formatting small improvement

Add a carriage return to build environment warning message to
avoid it being  mixed up with shell prompt.

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotinfoil: remove logging handler at shutdown
Markus Lehtonen [Mon, 21 Sep 2015 13:07:57 +0000 (16:07 +0300)] 
tinfoil: remove logging handler at shutdown

Otherwise the logger gets multiple handers (and the user get duplicate
logging output) if another tinfoil instance is initialized after one is
shut down().

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: remove time from builds in progress
Belen Barros Pena [Mon, 21 Sep 2015 18:01:09 +0000 (19:01 +0100)] 
toaster: remove time from builds in progress

In the 'latest builds' section of the all builds page,
completed builds show the time they completed at. Builds
in progress should not display such time, since they
haven't completed yet.

This patch removes the time information that was showing
for builds in progress, whatever that time actually was.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Add fake entry to Target_File for filesystem root
Elliot Smith [Tue, 22 Sep 2015 02:42:35 +0000 (19:42 -0700)] 
toaster: Add fake entry to Target_File for filesystem root

The files-in-image.txt file is produced by bitbake after an
image is created, listing all the files in the image.
However, this list doesn't include the root directory ('/').

buildinfohelper.py then tries to construct the filesystem
tree from this file, assuming that every directory apart from
the root directory (which is special-cased) can be assigned
a parent. But because the root directory isn't listed in
files-in-image.txt, an object for the root directory is never
created.

The direct subdirectories of the root ('./bin', './usr' etc.)
then can't be assigned a parent directory, as the object
representing the root directory doesn't exist. This
results in a Target_File lookup error and causes the
directory listing page to fail.

Fix this by creating a fake entry for the root directory
in the Target_File table, so that the direct subdirectories
of / can be assigned a parent. Note that it doesn't matter
that the root is faked, as its properties are never shown
in the directory structure tree.

[YOCTO #8280]

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: layerdetails Fix back button tab behaviour
Michael Wood [Tue, 22 Sep 2015 02:45:24 +0000 (19:45 -0700)] 
toaster: layerdetails Fix back button tab behaviour

This completes the behaviour fix of the back button in the layerdetails
page as we not only have parameters in our history we also have the hash
to indicate which tab is active. As we pop our history we need to show
the corresponding tab.

[YOCTO #8252]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: UI test improvements
Ke Zou [Wed, 23 Sep 2015 14:18:11 +0000 (15:18 +0100)] 
toaster: UI test improvements

* Add decorator in logging mechanism
* Add more debug information

Signed-off-by: Ke Zou <ke.zou@windriver.com>
Signed-off-by: Stanciu Mihail <stanciux.mihail@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: support selenium testing from mac OS X
brian avery [Wed, 23 Sep 2015 14:05:40 +0000 (15:05 +0100)] 
toaster: support selenium testing from mac OS X

* added a mac section to the cfg file
* added mac specific screenshot code

Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: add 2 UI tests
Ed Bartosh [Tue, 22 Sep 2015 09:34:55 +0000 (10:34 +0100)] 
toaster: add 2 UI tests

Tested that UI shows task names for the builds in
both all-builds and projectbuilds views.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>