]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/log
thirdparty/openembedded/openembedded-core-contrib.git
8 years agodata_smart: fix resetting of reference on variablehistory
Paul Eggleton [Tue, 13 Dec 2016 07:07:00 +0000 (20:07 +1300)] 
data_smart: fix resetting of reference on variablehistory

There is no "datasmart" member, only dataroot. This dates back to the
original implementation of variable history support - it's surprising we
haven't noticed the issue until now, but I guess it's rare to change a
copy of a datastore in a manner which using the old reference would
cause an issue.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: views Remove old code that converts template context to JSON
Michael Wood [Fri, 9 Dec 2016 16:52:55 +0000 (16:52 +0000)] 
toaster: views Remove old code that converts template context to JSON

Remove the template context to JSON decorator function as this is
deprecated by having a proper REST API.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: js test Update js tests to use correct url for layer REST
Michael Wood [Fri, 9 Dec 2016 16:52:54 +0000 (16:52 +0000)] 
toaster: js test Update js tests to use correct url for layer REST

Update js tests so that we use the new Layer REST API.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: Switch front end to use Layer get REST API
Michael Wood [Fri, 9 Dec 2016 16:52:53 +0000 (16:52 +0000)] 
toaster: Switch front end to use Layer get REST API

Switch the front end to use the proper REST API for retrieving layer
information.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: typeaheads Layers add url to layer REST API to the layer
Michael Wood [Fri, 9 Dec 2016 16:52:52 +0000 (16:52 +0000)] 
toaster: typeaheads Layers add url to layer REST API to the layer

Add the url to the Layer typeahead so that this can be used later on by
the front end code to look up layer details.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: api Add GET REST API for Layer information
Michael Wood [Fri, 9 Dec 2016 16:52:51 +0000 (16:52 +0000)] 
toaster: api Add GET REST API for Layer information

Add a get API for returning information about layers.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: importlayer Add git revision typeahead to that input field
Michael Wood [Fri, 9 Dec 2016 16:52:50 +0000 (16:52 +0000)] 
toaster: importlayer Add git revision typeahead to that input field

Add the front end mechanism to load the typeahead for the git revision
field on importing a layer.
Also fix one indentation issue and update the js test.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: typeaheads Add a git revisions suggestions
Michael Wood [Fri, 9 Dec 2016 16:52:49 +0000 (16:52 +0000)] 
toaster: typeaheads Add a git revisions suggestions

When we're importing a layer it's useful to suggest available git revisions of the
layers. This uses git ls-remote to fetch the revisions and then filter on this.
Caching is added for this typeahead to avoid having to fetch this
information multiple times in a single session.

[YOCTO #8429]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: typeaheads widgets Fix flake8 issues and remove redundant code
Michael Wood [Fri, 9 Dec 2016 16:52:48 +0000 (16:52 +0000)] 
toaster: typeaheads widgets Fix flake8 issues and remove redundant code

Fix flake8 issues and remove redundant __init__ function definitions
from typeaheads (likely a copy and paste error).

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: tests Update import layer test to use new Layer add api
Michael Wood [Fri, 9 Dec 2016 16:52:47 +0000 (16:52 +0000)] 
toaster: tests Update import layer test to use new Layer add api

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: importlayer Use new layer add API
Michael Wood [Fri, 9 Dec 2016 16:52:46 +0000 (16:52 +0000)] 
toaster: importlayer Use new layer add API

Switch the importlayer.js to use the new REST API for importing a new layer.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: api Add layer Add api
Michael Wood [Fri, 9 Dec 2016 16:52:45 +0000 (16:52 +0000)] 
toaster: api Add layer Add api

Add layer adding REST api and remove old views method.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: models Layer_Version get_detailspage_url optional project_id
Michael Wood [Fri, 9 Dec 2016 16:52:44 +0000 (16:52 +0000)] 
toaster: models Layer_Version get_detailspage_url optional project_id

Allow passing none as the project id, this is convenient for layers
which belong to projects already and therefore have their own project
field.

Add documentation string to function

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: models Layer fix whitespace
Michael Wood [Fri, 9 Dec 2016 16:52:43 +0000 (16:52 +0000)] 
toaster: models Layer fix whitespace

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: tablejs Add visual indicator for table data loading
Michael Wood [Fri, 9 Dec 2016 16:52:42 +0000 (16:52 +0000)] 
toaster: tablejs Add visual indicator for table data loading

Add a visual indicator when the data is changing in the table, for instance if
it's being re-ordered, searched or paginated.

[YOCTO #10104]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake-user-manual: Added new "Line Joining" section.
Scott Rifenbark [Wed, 19 Oct 2016 16:10:17 +0000 (09:10 -0700)] 
bitbake-user-manual: Added new "Line Joining" section.

Fixes [YOCTO #10444]

Added a new section about syntax called "Line Joining".  The
section describes how you can use the backslash character (\)
to joing stuff.

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
8 years agobitbake-user-manual: Refreshed the 'bitbake --help' output.
Scott Rifenbark [Fri, 14 Oct 2016 15:20:20 +0000 (08:20 -0700)] 
bitbake-user-manual: Refreshed the 'bitbake --help' output.

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
8 years agotoaster: Reference pip3 not pip
Richard Purdie [Thu, 8 Dec 2016 15:51:22 +0000 (15:51 +0000)] 
toaster: Reference pip3 not pip

Now that we use python3, we should refer to pip3, not pip.

[YOCTO #10774]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocooker: Handle inofity queue overflows more gracefully
Richard Purdie [Wed, 7 Dec 2016 14:20:48 +0000 (14:20 +0000)] 
cooker: Handle inofity queue overflows more gracefully

If many files change and the inotify queue overflows, rather than print
a traceback, invalidate the caches and warn the user.

[YOCTO #10676]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocooker: Fix world taskgraph generation issue
Richard Purdie [Mon, 14 Nov 2016 09:51:38 +0000 (09:51 +0000)] 
cooker: Fix world taskgraph generation issue

The processing of the "do_" prefix to tasks is currently inconsistent
and has resulted in "bitbake world -g" being broken as task prefixes
don't get handled correctly.

Make the "do_" task prefix handling consistent through various codepaths.

[YOCTO #10651]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoutils: Avoid traceback errors
Richard Purdie [Wed, 7 Dec 2016 12:07:06 +0000 (12:07 +0000)] 
utils: Avoid traceback errors

Avoid errors like:

ERROR: Exception handler error: 'NoneType' object has no attribute 'decode'

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqueue: Send BB_TASKDEPDATA for setscene tasks
Richard Purdie [Wed, 7 Dec 2016 12:04:45 +0000 (12:04 +0000)] 
runqueue: Send BB_TASKDEPDATA for setscene tasks

We now have code in OE that needs BB_TASKDEPDATA for setscene tasks. Therefore
generate and send this data. In this case its a "pre collapsed" tree
but that is fine for the use cases in question.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqueue: Add the taskhash to BB_TASKDEPDATA
Richard Purdie [Wed, 7 Dec 2016 12:04:44 +0000 (12:04 +0000)] 
runqueue: Add the taskhash to BB_TASKDEPDATA

Its useful to know the task hash in code using TASKDEPDATA so add this
data to the data structure. The recipe specific sysroots in OE
need this data.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake-worker: Further IO performance tweaks
Richard Purdie [Wed, 7 Dec 2016 12:04:43 +0000 (12:04 +0000)] 
bitbake-worker: Further IO performance tweaks

Looking further at the CPU loads on systems running large numbers of tasks,
the following things helps performance:

* Loop on waitpid until there are no processes still waiting
* Using select to wait for the cooker pipe to be writable before writing
  avoiding pointless 100% cpu usage
* Only reading from worker pipes that select highlights are readable

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolib/bs4: Fix imports from html5lib >= 0.9999999/1.0b8
Daniel Lublin [Mon, 5 Dec 2016 17:42:05 +0000 (18:42 +0100)] 
lib/bs4: Fix imports from html5lib >= 0.9999999/1.0b8

As of html5lib 0.9999999/1.0b8 (released on July 14, 2016), some modules
have moved from _base to base. Handle this, while staying compatible
with earlier versions.

Signed-off-by: Daniel Lublin <daniel@lublin.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocooker: convert type which needs to be marshalled
Sujith H [Thu, 1 Dec 2016 05:43:09 +0000 (11:13 +0530)] 
cooker: convert type which needs to be marshalled

We assume that the value taken by variable v can be string,
integer or any type which can be marshalled by xmlrpc. This
change would help us to convert the non marshallable types
to string. So that we don't get exception from xmlrpc.

[YOCTO #10740]

Signed-off-by: Sujith H <sujith.h@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: browser tests - add Selenium Docker container as driver
brian avery [Thu, 1 Dec 2016 03:35:27 +0000 (19:35 -0800)] 
toaster: browser tests - add Selenium Docker container as driver

Adds the ability to specify a Selenium Docker container server as
a driver. This allows for repeatable tests independent of host.
Currently we assume you are using the Firefox container. Instructions
are located in the README in tests/browser.

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agodepexp: fix string formatting.
Ismo Puustinen [Wed, 30 Nov 2016 12:43:19 +0000 (14:43 +0200)] 
depexp: fix string formatting.

The parameters to Python string formatting need to be inside a tuple.

Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agomonitordisk: add event
Patrick Ohly [Tue, 29 Nov 2016 16:47:45 +0000 (17:47 +0100)] 
monitordisk: add event

The current disk usage is interesting and may be worth logging over
time as part of the build statistics. Instead of re-implementing the
code and the configuration option (BB_DISKMON_DIRS), the information
gathered by monitordisk.py is made available to buildstats.bbclass via
a new event.

This has pros and cons:
- there is already a useful default configuration for "interesting" directories
- no code duplication
- on the other hand, users cannot configure recording separately from
  monitoring (probably not that important)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agomonitordisk.py: minor code and comment cleanup
Patrick Ohly [Tue, 29 Nov 2016 16:47:44 +0000 (17:47 +0100)] 
monitordisk.py: minor code and comment cleanup

There's no need to encode and decode the hash key as a single string,
a tuple works just fine. Iterating over entries can be written more
concisely.

Entries in the stat results are integers, not floating point values.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqueue.py: monitor disk space at regular time intervals
Patrick Ohly [Tue, 29 Nov 2016 16:47:43 +0000 (17:47 +0100)] 
runqueue.py: monitor disk space at regular time intervals

Hooking the disk monitor into the regular heatbeat event instead
of the runqueue solves two problems:

- When there is just one long running task which fills up the disk,
  the previous approach did not notice that until after the completion
  of the task because _execute_runqueue() only gets called on task
  state changes. As a result, aborting a build did not work in this
  case.

- When there are many short-lived tasks, disk space was getting
  checked very frequently. When the storage that is getting checked
  is on an NFS server, that can lead to noticable traffic to the
  server.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocooker process: fire heartbeat event at regular time intervals
Patrick Ohly [Tue, 29 Nov 2016 16:47:42 +0000 (17:47 +0100)] 
cooker process: fire heartbeat event at regular time intervals

The intended usage is for recording current system statistics from
/proc in buildstats.bbclass during a build and for improving the
BB_DISKMON_DIRS implementation.

All other existing hooks are less suitable because they trigger at
unpredictable rates: too often can be handled by doing rate-limiting
in the event handler, but not often enough (for example, when there is
only one long-running task) cannot because the handler does not get
called at all.

The implementation of the new heartbeat event hooks into the cooker
process event queue. The process already wakes up every 0.1s, which is
often enough for the intentionally coarse 1s delay between
heartbeats. That value was chosen to keep the overhead low while still
being frequent enough for the intended usage.

If necessary, BB_HEARTBEAT_EVENT can be set to a float specifying
the delay in seconds between these heartbeat events.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoast: remove BBVERSIONS support
Ross Burton [Wed, 16 Nov 2016 17:22:05 +0000 (17:22 +0000)] 
ast: remove BBVERSIONS support

BBVERSIONS is moderately horrible and it doesn't appear to be actually used by
anyone, so remove it to simplify the finalise codepaths.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocodeparser.py: support deeply nested tokens
Patrick Ohly [Fri, 18 Nov 2016 15:23:22 +0000 (16:23 +0100)] 
codeparser.py: support deeply nested tokens

For shell constructs like
   echo hello & wait $!
the process_tokens() method ended up with a situation where "token"
in the "name, value = token" assignment was a list of tuples
and not the expected tuple, causing the assignment to fail.

There were already two for loops (one in _parse_shell(), one in
process_tokens()) which iterated over token lists. Apparently the
actual nesting can also be deeper.

Now there is just one such loop in process_token_list() which calls
itself recursively when it detects that a list entry is another list.

As a side effect (improvement?!) of the loop removal in
_parse_shell(), the local function definitions in process_tokens() get
executed less often.

Fixes: [YOCTO #10668]
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetch2: obey BB_ALLOWED_NETWORKS when checking network access
Markus Lehtonen [Mon, 21 Nov 2016 12:31:43 +0000 (14:31 +0200)] 
fetch2: obey BB_ALLOWED_NETWORKS when checking network access

[YOCTO #10508]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: buildinfohelper Clarify log message for build history
Michael Wood [Thu, 24 Nov 2016 11:20:06 +0000 (11:20 +0000)] 
toaster: buildinfohelper Clarify log message for build history

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: buildinfohelper fix _get_layer_version_for_dependency
Michael Wood [Thu, 24 Nov 2016 11:20:05 +0000 (11:20 +0000)] 
toaster: buildinfohelper fix _get_layer_version_for_dependency

This function is simplified by not trying to handle replacing the regex
and just compiling and using it for matching.

- Fix typo in logger output with undefined variable
- Fix pyflake errors

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: buildinfohelper Simplify layer event to toaster layer function
Michael Wood [Thu, 24 Nov 2016 11:20:04 +0000 (11:20 +0000)] 
toaster: buildinfohelper Simplify layer event to toaster layer function

Simplify the layer event information to layer version object in toaster
function. Previously this attempted many different methods of trying to
obtain the correct layer from toaster by manipulating the data from the
event or the data from the known layers to try and match them together.

We speed up and simplify this process by making better use of django's
orm methods and by working down the most likely matching methods in order
of accuracy.

[YOCTO #10220]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: bldcontrol Move CustomImageRecipe file creation into own function
Michael Wood [Thu, 24 Nov 2016 11:20:03 +0000 (11:20 +0000)] 
toaster: bldcontrol Move CustomImageRecipe file creation into own function

Move the custom image file creation (i.e. create the layer file
structure, conf and recipe file) into it's own function and remove the
creation of the BRLayer as this is done at schedule_build just like all
the other layers.

Fix a bug where the toaster-custom-images layer was always being appened
to the layer list if the directory exists.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: orm models Handle CustomImageRecipe BRLayer here
Michael Wood [Thu, 24 Nov 2016 11:20:02 +0000 (11:20 +0000)] 
toaster: orm models Handle CustomImageRecipe BRLayer here

The schedule_build function on the project object is where the BRLayers
are created for the build. Instead of creating the BRLayer for the
CustomImageRecipe in the localhostbbcontroller create it here so that
all that mechanism is in one place.

Also fix a number of pyflake errors.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: orm models Project class Fix pyflake errors
Michael Wood [Thu, 24 Nov 2016 11:20:01 +0000 (11:20 +0000)] 
toaster: orm models Project class Fix pyflake errors

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: buildinfohelper toaster-custom-images layer
Michael Wood [Thu, 24 Nov 2016 11:20:00 +0000 (11:20 +0000)] 
toaster: buildinfohelper toaster-custom-images layer

This fixes the unidentified layers issue by making the
toaster-custom-images layer a local layer. By doing this we also fix the
git assumptions made for the local layers which stop recipes and other
meta data being associated with them. This also removed some of the
special casing previously needed when we didn't have the concept of a
local (non git) layer.

Also rename created flag var to a have a different var for each returned
value so that the same value isn't used multiple times.

[YOCTO #10220]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: localhostbecontroller write toaster layers for project to toaster-bblayers...
Sujith H [Thu, 24 Nov 2016 11:19:59 +0000 (11:19 +0000)] 
toaster: localhostbecontroller write toaster layers for project to toaster-bblayers.conf

Instead of updating conf/bblayers, here we update toaster-bblayers.conf
file. So extra effort to update bblayers.conf can be removed safely.

Signed-off-by: Sujith H <sujith.h@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: localhostbecontroller accept custom init script for build
Sujith H [Thu, 24 Nov 2016 11:19:58 +0000 (11:19 +0000)] 
toaster: localhostbecontroller accept custom init script for build

When passed variable CUSTOM_BUILD_INIT_SCRIPT to toaster
setting, it would be nice to use it. Else toaster
can use oe-init script. This gives an oppurtunity to
use customized build init scritps.

Signed-off-by: Sujith H <sujith.h@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: tablejs Fix missing close square bracket
Reyna, David [Thu, 24 Nov 2016 11:19:57 +0000 (11:19 +0000)] 
toaster: tablejs Fix missing close square bracket

There is a missing close square bracket.

[YOCTO #10631]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: orm gen_layerdeps Protect against circular Layer dependencies
Reyna, David [Thu, 24 Nov 2016 11:19:56 +0000 (11:19 +0000)] 
toaster: orm gen_layerdeps Protect against circular Layer dependencies

Limit the recursion (to say 20 levels) when processing layer dependencies
so that circular dependecies do not cause infinite decent and an
out-of-memory failure. The duplicate found layers are already immediately
filtered in the code.

[YOCTO #10630]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: customrecipejs Consume click event on 'a' link if disabled
Michael Wood [Thu, 24 Nov 2016 11:19:55 +0000 (11:19 +0000)] 
toaster: customrecipejs Consume click event on 'a' link if disabled

Consume the click event on the download recipe link if it's disabled. To
prevent the link from sending user to an error page.
See http://getbootstrap.com/css/#forms-disabled-fieldsets and a link
caveat.

[YOCTO #10151]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: Add an example production settings file
Michael Wood [Thu, 24 Nov 2016 11:19:54 +0000 (11:19 +0000)] 
toaster: Add an example production settings file

Add an example settings that can be used for the basis of the production
instance of Toaster.

[YOCTO #10581]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: tests Add management command tests
Michael Wood [Thu, 24 Nov 2016 11:19:53 +0000 (11:19 +0000)] 
toaster: tests Add management command tests

Add some simple sanity tests for the management commands that we use for
Toaster.

Can be executed with ./manage.py test tests.commands

For faster execution use the test settings and keepdb flag:
DJANGO_SETTINGS_MODULE=toastermain.settings_test ./manage.py test
tests.commands --keepdb

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: runbuilds Write the pidfile in python rather than shell script
Michael Wood [Thu, 24 Nov 2016 11:19:52 +0000 (11:19 +0000)] 
toaster: runbuilds Write the pidfile in python rather than shell script

Write the pid file out in the start up of this management command. This
ensures this has happened instead of relying on the shell command having
been run which may or may not be the case. This also makes it simpler for
testing.

Couple of clean ups of runbuilds as identified by pyflake

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake: remove True option to getVarFlag calls
Joshua Lock [Fri, 25 Nov 2016 15:28:09 +0000 (15:28 +0000)] 
bitbake: remove True option to getVarFlag calls

getVarFlag() now defaults to expanding by default, thus remove the
True option from getVarFlag() calls with a regex search and
replace.

Search made with the following regex:
getVarFlag ?\(( ?[^,()]*, ?[^,()]*), True\)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake: remove True option to getVar calls
Joshua Lock [Fri, 25 Nov 2016 15:28:08 +0000 (15:28 +0000)] 
bitbake: remove True option to getVar calls

getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.

Search made with the following regex: getVar ?\(( ?[^,()]*), True\)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake-worker: Handle cooker/worker IO deadlocking
Richard Purdie [Thu, 24 Nov 2016 21:41:30 +0000 (21:41 +0000)] 
bitbake-worker: Handle cooker/worker IO deadlocking

I noiced builds where tasks seemed to be taking a surprisingly long time.
When I looked at the output of top/pstree, these tasks were no longer
running despite being listed in knotty. Some were in D/Z state waiting for
their exit code to be collected, others were simply not present at all.

strace showed communication problems between the worker and cooker, each
was trying to write to the other and nearly deadlocking. Eventually, timeouts
would allow them to echange 64kb of data but this was only happening every
few seconds.

Whilst this particularly affected builds on machines with large numbers
of cores (and hence highly parallal task execution) and in cases where
I had a lot of debug enabled, this situation is clearly bad in general.

This patch introduces a thread to the worker which is used to write data
back to cooker. This means that the deadlock can't occur and data flows
much more freely and effectively.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoCOW.py: fix sample codes
Kai Kang [Sun, 9 Oct 2016 08:34:32 +0000 (16:34 +0800)] 
COW.py: fix sample codes

The call of methods iteritems() and itervalues() in sample codes were
replaced by items() and values() to convert to Python 3 by Bitbake rev
d0f904d407f57998419bd9c305ce53e5eaa36b24. But the methods iteritems()
and itervalues() belong to class COWDictMeta not class dict or set. The
modifications should not be made in purpose that it fails to run sample
codes, so revert them.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: layerindex updater Take into account layers being predefined
Michael Wood [Thu, 10 Nov 2016 03:52:34 +0000 (19:52 -0800)] 
toaster: layerindex updater Take into account layers being predefined

As we can now provide layer definitions through fixtures we need to be
more clever how we update the metadata in the database to avoid
duplicate metadata being created. To do this we make more effort to
match existing data in the database and update only the fields which
will be better provided by the layer index.

This removes the need for us to special case layers which are provided
as part of poky such as openembedded-core or meta-poky which exist on
the layerindex but with different git urls.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: orm/fixtures Add the master release and correct morty release
Michael Wood [Thu, 10 Nov 2016 03:52:33 +0000 (19:52 -0800)] 
toaster: orm/fixtures Add the master release and correct morty release

Add the master release option to base your project on and correct the
morty release so that for poky based setups we use the poky provided
version of the layer rather than checking out the layer from its own git
repository.

[YOCTO #10497]

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: settings fixture Set default release to master
Michael Wood [Thu, 10 Nov 2016 03:52:32 +0000 (19:52 -0800)] 
toaster: settings fixture Set default release to master

Now that morty has been released we now set the DEFAULT_RELEASE back to
master.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotaskdata.py: improve handling of depends/rdepends
Patrick Ohly [Mon, 14 Nov 2016 09:39:14 +0000 (10:39 +0100)] 
taskdata.py: improve handling of depends/rdepends

Error handling only caught the cause where a dependency did not have
any colon, but ignored the case where more than one was given. Now
"pn:task:garbage" will raise an error instead of ignoring ":garbage".

The error message had a misplaced line break (?) with the full stop
on the next line. Indenting the explanation with a space might have
been intended and is kept.

split() was called three times instead of just once.

Instead of improving the two instances of the code (one for 'depends',
one for 'rdepends'), the common code is now in a helper function.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agodata_smart.py: don't reorder internal bitbake variables when calculating hash
Patrick Ohly [Mon, 14 Nov 2016 09:39:00 +0000 (10:39 +0100)] 
data_smart.py: don't reorder internal bitbake variables when calculating hash

Commit 260ced745 added __BBTASKS, __BBANONFUNCS, __BBHANDLERS to the
data that gets hashed, but only after reordering these lists. The
intention probably was to make the hash deterministic, but that's
unnecessary (the content of the variables should already be
deterministic) and hides potential reasons that might require
re-parsing.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agodata_smart: Default to expansion for getVar/getVarFlags
Richard Purdie [Wed, 16 Nov 2016 11:20:42 +0000 (11:20 +0000)] 
data_smart: Default to expansion for getVar/getVarFlags

We've been building to this for a while, default to return expanded
values for getVar/getVarFlags.

We can then go through and remove the "True" option to many of the
calls to this function, all function calls should have a default by now
though since the parameter has been required for a while.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agodata: Drop deprecated old style bitbake API
Richard Purdie [Wed, 16 Nov 2016 11:20:06 +0000 (11:20 +0000)] 
data: Drop deprecated old style bitbake API

The old style bb.data.getVar/setVar API has long since been deprecated in
favour of d.getVar/setVar and friends.

Now we're about to change the default expansion parameter, drop the old APIs
to simplify the transition and ensure everyone is using the new style functions.
Conversion is trivial if there are remaining stragglers.

I've left bb.data.expand() for now since its more widely used but would make a good
follow up patch series.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolib/bb: Don't use deprecated bb.data.getVar/setVar API
Richard Purdie [Wed, 16 Nov 2016 11:19:01 +0000 (11:19 +0000)] 
lib/bb: Don't use deprecated bb.data.getVar/setVar API

The old style bb.data.getVar/setVar API is obsolete. Most of bitbake
doesn't use it but there were some pieces that escaped conversion. This
patch fixes the remaining users mostly in the fetchers.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetch2: npm: conditionally hide NPM_LOCKDOWN / NPM_SHRINKWRAP warnings
Paul Eggleton [Tue, 15 Nov 2016 20:11:03 +0000 (09:11 +1300)] 
fetch2: npm: conditionally hide NPM_LOCKDOWN / NPM_SHRINKWRAP warnings

If ud.ignore_checksums is set (which we currently use to suppress the
warnings for missing SRC_URI checksums when fetching files from
scripts), then if we're fetching an npm package we should similarly
suppress the warnings when NPM_LOCKDOWN and NPM_SHRINKWRAP aren't set.

At the same time, make any errors reading either of these files actual
errors since if the file is specified and could not be found, that
should be an error - not the exact same warning.

Fixes [YOCTO #10464].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: settings set ALLOWED_HOSTS to * in debug mode
brian avery [Fri, 4 Nov 2016 12:27:06 +0000 (12:27 +0000)] 
toaster: settings set ALLOWED_HOSTS to * in debug mode

As of Django 1.8.16, Django is rejecting any HTTP_HOST header that is
not on the ALLOWED_HOST list.  We often need to reference the
toaster server via a fqdn, if we start it via webport=0.0.0.0:8000 for
instance, and are hitting the server from a laptop. This change does
reduce  the protection from a DNS rebinding attack, however, if you are
running the toaster server outside a protected network, you should be
using the production instance.

[YOCTO #10578]

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolib/bb/cooker.py: fix for BBFILE_PATTERN = ""
Robert Yang [Thu, 27 Oct 2016 08:50:18 +0000 (01:50 -0700)] 
lib/bb/cooker.py: fix for BBFILE_PATTERN = ""

There would be error when BBFILE_PATTERN = None:
  BBFILE_PATTERN_foo not defined

This is the correct behaviour, but when the layer sets BBFILE_PATTERN = "",
it would match all the remaining recipes, and cause "No bb files matched BBFILE_PATTERN"
warnings for all the layers which behind it.

When a layer sets BBFILE_PATTERN = "" (for example, a layer only
provides git repos and source tarballs), now it means has no recipes.
This is different from BBFILE_PATTERN_IGNORE_EMPTY, the later one means
that it *may* not have any recipes.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoasterui.py: warn if buildstats is missing
Olaf Mandel [Fri, 28 Oct 2016 14:04:10 +0000 (14:04 +0000)] 
toasterui.py: warn if buildstats is missing

Like for buildhistory, warn if buildstats is missing from INHERIT.

CC: Joshua Lock <joshua.g.lock@linux.intel.com>
Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: add tests/eventreplay/README
Ed Bartosh [Mon, 31 Oct 2016 16:40:40 +0000 (16:40 +0000)] 
toaster: add tests/eventreplay/README

Put instructions on how to prepare event log files
and run eventreplay tests.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: add eventreplay test case for zlib
Ed Bartosh [Mon, 31 Oct 2016 16:40:39 +0000 (16:40 +0000)] 
toaster: add eventreplay test case for zlib

Run toaster-eventreplay with zlib.events.
Check if zlib build and package present in Toaster database.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: add eventreplay test case for core-image-minimal
Ed Bartosh [Mon, 31 Oct 2016 16:40:38 +0000 (16:40 +0000)] 
toaster: add eventreplay test case for core-image-minimal

Run toaster-eventreplay with core-image-minimal.events and
test if all required packages present in Target_Installed_Package
table.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: use current directory if BUILDDIR is not set
Ed Bartosh [Mon, 31 Oct 2016 16:40:37 +0000 (16:40 +0000)] 
toaster: use current directory if BUILDDIR is not set

If BUILDDIR environment variable is not set signal_runbuilds function
throws TypeError as os.getenv('BUILDDIR') returns None:

ERROR: unsupported operand type(s) for +=: 'NoneType' and 'str'
Traceback (most recent call last):
  File "bitbake/lib/bb/ui/toasterui.py", line
391, in main
    buildinfohelper.update_build_information(event, errors, warnings,
taskfailures)
  File "bitbake/lib/bb/ui/buildinfohelper.py",
line 1184, in update_build_information
    self.internal_state['build'], errors, warnings, taskfailures)
  File "bitbake/lib/bb/ui/buildinfohelper.py",
line 238, in update_build_stats_and_outcome
    signal_runbuilds()
  File "bitbake/lib/toaster/orm/models.py", line
1746, in signal_runbuilds
    '.runbuilds.pid')) as pidf:
  File "/usr/lib64/python3.4/posixpath.py", line 82, in join
    path += b
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'

Used os.getenv('BUILDIR', '.') to make it always return meaningful
directory path. Current directory '.' will be used if BUILDDIR is
not set.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: buildinfohelper Handle regex paths
brian avery [Fri, 28 Oct 2016 16:52:51 +0000 (17:52 +0100)] 
toaster: buildinfohelper Handle regex paths

We were presuming that all the layer dependency information was of the
form "^/path/to/layer" to we were just stripping the leading "^" off of
the layer information when we were matching the layer priorities to the
toaster database.  This patch splits out the priorities layer match which
gets a  regex from the task/recipe match which is gets a path.

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotoaster: tests builds test_core_image_min Clean ups
Michael Wood [Fri, 28 Oct 2016 15:48:49 +0000 (18:48 +0300)] 
toaster: tests builds test_core_image_min Clean ups

Instead of searching for the build for each test just use the returned
value of the completed build.

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>
8 years agotoaster: tests builds Update buildtest
Michael Wood [Fri, 28 Oct 2016 15:48:48 +0000 (18:48 +0300)] 
toaster: tests builds Update buildtest

Now that we're using fixtures for configuration just load these instead
of trying to search for a toasterconf json file.

Also for convenience add the ability for the tests to source the build
environment script. To use this test make sure that directories are in
the same layout as poky.

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>
8 years agotoaster: orm models Handle run builds process not yet running
Michael Wood [Fri, 28 Oct 2016 15:48:47 +0000 (18:48 +0300)] 
toaster: orm models Handle run builds process not yet running

During tests we may want to call the runbuilds process manually for
example when doing a "one shot" approach rather than a long running
process during tests.

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>
8 years agotoaster: test browser test_layerdetails_page add wait_until_visible
Michael Wood [Fri, 28 Oct 2016 15:48:46 +0000 (18:48 +0300)] 
toaster: test browser test_layerdetails_page add wait_until_visible

Add an additional wait_until_visible for the save buttons as firefox
animates this into view so slowly we get a race on them being visible

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>
8 years agotoaster: Remove contrib tts
Michael Wood [Fri, 28 Oct 2016 15:48:45 +0000 (18:48 +0300)] 
toaster: Remove contrib tts

Remove the "Toaster test system". We don't need a home brew
test "framework" as the django test runner is more than adequate.
None of these tests here are currently working and have been obsoleted
by the work done on unit and browser tests in ./tests/.

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>
8 years agotoaster: Delete useless bldcontrol/test
Michael Wood [Fri, 28 Oct 2016 15:48:44 +0000 (18:48 +0300)] 
toaster: Delete useless bldcontrol/test

It doesn't work nor does it test anything useful

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>
8 years agotoaster: Move views tests to main testing module
Michael Wood [Fri, 28 Oct 2016 15:48:43 +0000 (18:48 +0300)] 
toaster: Move views tests to main testing module

Consolidating all the tests to live in the same place to make them more
discoverable and consistent as well as not cluttering up the django app
directory.

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>
8 years agotoaster: views Tests fix all pyflake identified issues
Michael Wood [Fri, 28 Oct 2016 15:48:42 +0000 (18:48 +0300)] 
toaster: views Tests fix all pyflake identified issues

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>
8 years agobitbake-worker: print full traceback instead of message only
Markus Lehtonen [Tue, 1 Nov 2016 15:05:12 +0000 (17:05 +0200)] 
bitbake-worker: print full traceback instead of message only

Print full traceback instead of just the exception message in the
child() function inside fork_off_task(). This makes debugging a lot
easier as the function catches a generic "Exception" and the exception
message alone might not give much information.

[YOCTO #10393]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agodata: fix exception handling in exported_vars()
Markus Lehtonen [Tue, 1 Nov 2016 15:05:11 +0000 (17:05 +0200)] 
data: fix exception handling in exported_vars()

Fix a bug where a totally wrong value of a variable would be exported if
an exception happened during d.getVar(). Also, print a warning if an
exception happends instead of silently ignoring it. It would probably be
best just to raise the exception, instead, but use the warning for now
in order to avoid breaking existing builds.

[YOCTO #10393]

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosiggen: Ensure taskhash mismatches don't override existing data
Richard Purdie [Wed, 2 Nov 2016 15:07:33 +0000 (15:07 +0000)] 
siggen: Ensure taskhash mismatches don't override existing data

We recalculate the taskhash to ensure the version we have matches
what we think it should be. When we write out a sigdata file, use
the calculated value so that we don't overwrite any existing file.
This leaves any original taskhash sigdata file intact to allow a
debugging comparison.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agosiggen: Pass basehash to worker processes and sanity check reparsing result
Richard Purdie [Wed, 2 Nov 2016 15:06:50 +0000 (15:06 +0000)] 
siggen: Pass basehash to worker processes and sanity check reparsing result

Bitbake can parse metadata in the cooker and in the worker during builds. If
the metadata isn't deterministic, it can change between these two parses and
this confuses things a lot. It turns out to be hard to debug these issues
currently.

This patch ensures the basehashes from the original parsing are passed into
the workers and that these are checked when reparsing for consistency. The user
is shown an error message if inconsistencies are found.

There is debug code in siggen.py (see the "Slow but can be useful for debugging
mismatched basehashes" commented code), we don't enable this by default due to
performance issues. If you run into this message, enable this code and you will
find "sigbasedata" files in tmp/stamps which should correspond to the hashes
shown in this error message. bitbake-diffsigs on the files should show which
variables are changing.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobuild: Ensure we preserve sigbasedata files as well as sigdata ones
Richard Purdie [Wed, 2 Nov 2016 15:06:00 +0000 (15:06 +0000)] 
build: Ensure we preserve sigbasedata files as well as sigdata ones

We don't remove sigdata files, we also shouldn't remove sigbasedata files
as this hinders debugging.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Update default release to Morty
brian avery [Fri, 14 Oct 2016 15:28:01 +0000 (16:28 +0100)] 
toaster: Update default release to Morty

Set Morty to be the default release in toaster for the Morty release
when creating new projects.

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Update poky fixture for Morty release
brian avery [Fri, 14 Oct 2016 15:28:00 +0000 (16:28 +0100)] 
toaster: Update poky fixture for Morty release

Update the poky fixture to the Morty release.  This removes the
master branch from the release and limits it to the morty branch.
Normally, we would also support at least one past branch but the change
from Python 2.7 -> Python 3 makes that infeasible.

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: Update oe-core fixture for Morty release
brian avery [Fri, 14 Oct 2016 15:27:59 +0000 (16:27 +0100)] 
toaster: Update oe-core fixture for Morty release

Update the oe-core fixture to the Morty release.  This removes the
master branch from the release and limits it to the morty branch.
Normally, we would also support at least one past branch but the change
from Python 2.7 -> Python 3 makes that infeasible.

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobb.event: fix infinite loop on print_ui_queue
Aníbal Limón [Fri, 14 Oct 2016 15:48:39 +0000 (10:48 -0500)] 
bb.event: fix infinite loop on print_ui_queue

If bitbake ends before _uiready and bb.event.LogHandler was add
to the bitbake logger it causes an infinite loop when logging
something.

The scenario is print_ui_queue is called at exit and executes
the log handlers [2] one of them is bb.event.LogHandler this handler
appends the same entry to ui_queue causing the inifine loop [3].

In order to fix a new copy of the ui_queue list is created when iterate
ui_queue.

[YOCTO #10399]

[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=10399#c0
[2] http://git.openembedded.org/bitbake/tree/lib/bb/event.py?id=41d9cd41d40b04746c82b4a940dca47df02514fc#n156
[3]
http://git.openembedded.org/bitbake/tree/lib/bb/event.py?id=41d9cd41d40b04746c82b4a940dca47df02514fc#n164

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake-user-manual: Changed BB_SETSCENE_VERIFY_FUNCTION name
Scott Rifenbark [Thu, 13 Oct 2016 22:00:23 +0000 (15:00 -0700)] 
bitbake-user-manual: Changed BB_SETSCENE_VERIFY_FUNCTION name

The BB_SETSCENE_VERIFY_FUNCTION variable has effectively changed
to BB_SETSCENE_VERIFY_FUNCTION2.  I changed the three areas in the
book.  Basically a name change.

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
9 years agobitbake-user-manual: Fixes small typos for 'addtask' section
Scott Rifenbark [Tue, 11 Oct 2016 14:59:46 +0000 (07:59 -0700)] 
bitbake-user-manual: Fixes small typos for 'addtask' section

Fixes [YOCTO #10401]

Applied some edits to various areas of the section.  These
were minor in nature.

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
9 years agobitbake-user-manual: Updated the [noexec] and [nostamp] flag descriptions
Scott Rifenbark [Mon, 10 Oct 2016 19:49:06 +0000 (12:49 -0700)] 
bitbake-user-manual: Updated the [noexec] and [nostamp] flag descriptions

Fixes [YOCTO #10401]

Added some wording to clarify that setting these flags to "1"
causes the desired action.  Also, provided a cautionary note
about tasks depending on any [nostamp] task causes the task
to always be executed and could cause unnecessary rebuild time.

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
9 years agobitbake-user-manual: Fleshed out the "addtask" documentation
Scott Rifenbark [Mon, 10 Oct 2016 19:39:59 +0000 (12:39 -0700)] 
bitbake-user-manual: Fleshed out the "addtask" documentation

Fixes [YOCTO #10401]

The "addtask" documentation was rewritten to tighten up the
introductory section and to flesh out the actual examples.

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
9 years agobitbake-user-manual: Updated the datastore functions
Scott Rifenbark [Mon, 10 Oct 2016 18:48:03 +0000 (11:48 -0700)] 
bitbake-user-manual: Updated the datastore functions

Fixes [YOCTO #10400]

No information existed for cases when a variable did not exist.
I added this information to each of the variables in the table.

Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
9 years agorunqueue.py: Remove redundant whitelist checks
Randy Witt [Tue, 11 Oct 2016 22:36:19 +0000 (15:36 -0700)] 
runqueue.py: Remove redundant whitelist checks

The whitelist checks for BB_SETSCENE_ENFORCE were running for every call
to execute(). Since the task list doesn't change for each call into
execute, the checks only need to be ran once.

[YOCTO #10369]

Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobitbake: Update version to 1.32.0
Richard Purdie [Tue, 11 Oct 2016 07:46:35 +0000 (08:46 +0100)] 
bitbake: Update version to 1.32.0

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agodepexp: Close UI with error message on NoProvider event
Jussi Kukkonen [Mon, 10 Oct 2016 08:30:04 +0000 (11:30 +0300)] 
depexp: Close UI with error message on NoProvider event

Without this the UI just sits there doing nothing. Showing an
infobar in-UI would be nicer but not much more useful since currently
user couldn't do anything in-UI to fix the situation. Implementation
is based on the one in knotty.

Fixes [YOCTO #9288]

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agomain: Check bitbake server-only port is a number
Benjamin Esquivel [Fri, 7 Oct 2016 21:46:26 +0000 (16:46 -0500)] 
main: Check bitbake server-only port is a number

Either using the memres script or the bitbake call with --server-only
if the port is a string instead of a number then the process hangs
indefinitely causing a loop that never ends.

Add a check at the beginning for the port being a number otherwise
show an error message and exit cleanly.

[YOCTO #10397]

Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agorunqueue: Optimise task id string manipulations
Richard Purdie [Fri, 7 Oct 2016 07:26:48 +0000 (08:26 +0100)] 
runqueue: Optimise task id string manipulations

Some task id manipulations were suboptimal:

* taskfn_fromtid and fn_from_tid were effectively the same function
* many calls to split_tid(), then taskfn_fromtid()
* taskfn_fromtid() called split_tid() internally

This patch adds split_tid_mcfn() to replace split_tid() and returns the
"taskfn" variant being used in many places. We update all core calls
to the new function and ignore the return values we don't need since the
function call overhead of the split_tid wrapper is higher than ignoring
a return value.

The one remaining standalone use of taskfn_fromtid is replaced with
fn_from_tid. I couldn't see any external usage so it was dropped.

There is external usage of split_tid so a wrapper remains for it.

Combined together these changes should improve some of the runqueue task
manipulation performance.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agotoaster: fix cloning of git+ssh repositories
Ed Bartosh [Fri, 7 Oct 2016 06:23:20 +0000 (09:23 +0300)] 
toaster: fix cloning of git+ssh repositories

Replaced '+' -> '_' to avoid having '+' in folder name.

Thanks Stephan Dünner for this fix.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
9 years agobb.runqueue: fix unexpected process death logic
Christopher Larson [Fri, 7 Oct 2016 04:07:41 +0000 (21:07 -0700)] 
bb.runqueue: fix unexpected process death logic

`if w in self.rq.worker` when w *is* self.rq.worker doesn't make a great deal
of sense, and results in this error:

      File ".../poky/bitbake/lib/bb/runqueue.py", line 2372, in runQueuePipe.read():
                             name = None
        >                    if w in self.rq.worker:
                                 name = "Worker"
    TypeError: unhashable type: 'dict'

Most likely this was meant to be 'is' rather than 'in', but rather than
checking after the fact, just include the name in the iteration, instead.

While we're here, also clean up and fix the broken error message.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>