data: Ensure dependencies of subfunctions are accounted for

Currently we account of the top level function's vardeps but not
those of any subfunction. This would imply we'd have to manually
write the dependencies of all parent functions which would be crazy.

This patch adds the dependencies to fix the issue.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch2/git: Clean up sortable_revision

Now we no longer try and provide increasing values from the fetcher,
we can simplify the function structure for the sortable_revision
pieces and move the AUTOINC handling directly into the function
which needs it, simplifying the code.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
fetch2: Shorten long srcrevs

The long srcrevs are mainly used or the workdir construction as well as
the package version. The long entries are hashes generated by the git fetcher
and other scms using a similar revision mechanism.

We need these to change when the package changes however collisions are
unlikely to happen within the domains we care about. The long revisions
have generated negative user feedback due to the use in path and file
names.

This patch therefore truncates the revisions to 10 characters maximum.

This should be safe in the contexts where these revisions are used as
the chances of spatially close collisions is very low (distant
collisions are not a major issue in the way we use these).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bin/bitbake: Improve exception handling

Due to the internal event processing, this excepting handler usually raises an
Empty error, masking the underlying failure. Ensure the original exception is
raised.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake: Create cookerdata splitting config from cooker and bin/bitbake

Currently the UI and server configuration is one big incestuous mess. To
start to untangle this we creater cookerdata, a new module which contains
various confiuration modules and the code for building the base datastore.

To start with we add a ConfigParameters() class which contains information
about both the commandline configuration and the original environment.

The CookerConfiguration class is created to contain the cooker.configuration
options. This means we can transfer new paramters to the server over something
like XMLRPC and then build a new configuration from these on the server.

Based on a patch from Alexandru Damian <alexandru.damian@intel.com>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cooker: Move commandline parsing back into the UI/cookerdata

Building up a set of actions for the server is tricky since we depend upon the
commandline but fall back to values from the datastore. We should be able to build
a datastore without a commandline and vice versa. Ultimately the UI should send
the commands to the server.

This patch amounts to code rearranging, moving the heavy lifting to the UI, though
a helper in the configuration option. This will need further cleanup/tweaking but
this should be the only update needed to the UIs. The code now queries the server
for any missing data should it need to.

This code allows various knowledge of configuration variables to move to the UI side
only, partcularly pkgs_to_build but also all the command specifiers. It should also
be possible to move cmd eventually, I'm just unsure if any callers call the commands
expecting this to default to something sane right now.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cooker: Split configuration parsing code into cookerdata

In order to have a memory resident bitbake and to allow task execution, we need
to be able to rebuild the base configuration without a cooker. This moves the
code into its own class so it can be built independently.

The interface is less than ideal here but I didn't want to add parsing methods
a subclassed DataSmart, at least until we've experimented further with this code
and are certain that makes sense. At the very least, the methods are ugly and need
cleaning up.  Spliting the code out seems to be the right thing to do though and
should unblock various activities on BitBake so I believe this code is a step in
the right direction.

Based on a patch from Alexandru Damian <alexandru.damian@intel.com>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/cookerdata: Explicitly specify cooker configuration options

As the code stands today its hard to know which configuration variables
are used by which parts of the system. Some are used by the UIs, some
by bin/bitbake itself, some by cooker.

This patch changes the configuration to just contain the variables cooker
uses, and changes bin/bitbake to access the variables it needs directly
which hopefully lets us start to untangle this mess.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
runqueue.py: Ensure export flag is set for fakeroot environment variables

This means the variables show up in the shell execution "run" files since
its useful to know what the fakeroot environment is and how to set it up
manually.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
command: Fix function module reference after code rearrangement

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake-layers: fix for move of calc_bbfile_priority within cooker

calc_bbfile_priority is now in CookerCollectFiles which can be accessed
on the collection attribute of a cooker instance.

Fixes [YOCTO #4513].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
tinfoil: fix for changes to cooker config structure

Fix the code here for recent changes to the initialisation of
configuration objects for cooker.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cookerdata: rename _parse to parse_config_file

We use this externally in the OE layer index update script, so it
shouldn't really be named as an internal function.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
hob: apply a fade out animation when deselecting from tables

-applied a fade out mechanism for deselctiong on all the tabs of
recipes and packages list page
-set cursor on the package/recipe when it is included(important
when the its place is changing; like when the tree si order by
included tab)

[YOCTO #4342]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
hob: Table sorting criteria should not change after deselecting recipes/packages

After a recipe/package is deselected, the table is sorted as before the
fadeout animation.

[YOCTO #4453]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Merge branch 'master' into wmat