cooker: Only change self.data if it exists

With the change to more optimal default featureset behaviour, a race was
exposed by hob where the code may try and change self.data before it
exists. This change avoids that.

When the datastore is created, the cooker configuration is used so
data tracking is correctly handled regardless.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bin/bitbake/cooker: Ensure initial featureset is optimal

If the featureset didn't match the defaults, we'd pay the price of two
base configuration parses which showed up adversely in the performance
benchmarks. This also passes the feature set into the cooker creation so
in the common case we don't have to reset the server. This speeds up
both knotty and hob startup. If the featureset doesn't match, the system
will reset as before, this just streamlines the common case.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
prserv: Fix exit race issues

We shouldn't immediately remove the pid file when stopping the server, if we do, this
causes a traceback within the server itself which can then hang. Fix this by removing
the stale pid file as the last thing we do.

Also:

* don't printing a new "waiting" line every 0.5 seconds.
* make the loop more granular since the user can 'feel' the 0.5 seconds

[YOCTO #5984]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake: toaster: do not trap SIGCHLD

We remove trapping SIGCHLD due to a weird interaction
with the bash version used with Ubuntu 14.04 LTS.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bin/bitbake: Only try and process an event_queue if it exists

The connection may have failed before the event queue has been setup.
Handle this correctly in the exception handler.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
server/xmlrpc: Simlify featureset handling

Rather than passing featureset around various places where the data doesn't
really belong, run a command at connection time to set the appropriate
features. This is similar to what the process server does.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
user-manual-intro.xml: updated bitbake -h output

The new -S syntax is in there now.

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
user-manual-execution.xml: Updated "Checksum (Signatures) section.

Fixes [YOCTO #5357]

Added a paragraph at the end of this section to address the fact
that the user can now debug Bitbake's processing of signatures.
This introduces the -S bitbake option and the fact that the
user can provide a couple parameters with it: "none" and
"printdiff".

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
user-manual-execution.xml: Added how BB processes curly braces.

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
runqueue: Fix sstate task dependency problems

If a setscene task has [depends], its possible they may still get executed out
of order. The issue is that the dependencies are set to set() for all tasks
involved. This patch adds back in explict dependencies within these chains
to avoid the setscene task failures.

[YOCTO #6069]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
runqueue: Address issues with incomplete sstate sets

The first part of the sstate code checks en-mass whether given checksums
are available. The next part of the code then either triggers those
setscene tasks either running them or skipping them if they've been
covered by others.

The problems was that this second part would always skip a task if it
was unavailable in the first part, even if it would have otherwise been
covered by other tasks.

This mean the mere presence of an artefact (or lack of presence) could
cause a different build failure.

The issue reproduces if you run a build and populate an sstate feed, then
run a second build off that feed, then run a third build off the sstate
feed of the second build (which is reduced in size).

The fix is rather than immediately skipping tasks if the checksum is
unavailable, create a list of missing tasks, then, if that task cannot
be covered by others we can skip it later. The deferral makes the
behaviour the same even when the cache is "incomplete".

[YOCTO #6081]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
toaster: update saving sstate task data

This is an update on the sstate file saving data.
It saves both found and missed sstate tasks.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: fix timezone detection

This patch replaces faulty timezone detection with a version
that simply reads the TZ environment variable if it is set.

If the TZ is not set, we do a reverse match search among known
timezone definitions and take the first match.

    [YOCTO #5499]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
toaster: Display task description

Display task description as content of help bubble for a task.

[YOCTO #5748]

Signed-off-by: Ravi Chintakunta <ravi.chintakunta@timesys.com>
toaster: use deploy_dir var to obtain the license.manifest path

[YOCTO #6051]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
toaster: disable configvar sorts for value and files

Disable the sort on files because it sorts on the file array's
first (and invisible) element. Disable the sort on values
because the raw ASCII sort looks wrong to the general user,
especially for values with leading spaces.

[YOCTO #6004]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
toaster: Show "No builds found" in the builds table

Making sure the h1 of build.html shows "No builds found"
instead of "0 builds found" when a search returns no results.
This matches the builds table to all other Toaster tables.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
toaster: Remove trailing spaces from 'name'

Remove all trailing spaces from 'name' because they show up
in the filter headings, which I find incredibly annoying.

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
toaster: Small tweaks to the packages included interface

* Capitalise correctly the label "Reverse runtime dependencies"

* Change dependency popover labels to match the rest of the
interface

* Make sure that dependency links go to the initial tab
of the installed package details pages

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
toaster: Fix the fade out animation

Apply the animation to any element with the class
.highlight

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>