]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/log
thirdparty/openembedded/openembedded-core-contrib.git
12 years agogit: Use git branch for ancestor checks
Richard Purdie [Tue, 19 Nov 2013 13:08:59 +0000 (13:08 +0000)] 
git: Use git branch for ancestor checks

Using git merge-base for checking for ancestors is nice but required git 1.8.0
which is not in many distrbutions yet. We therefore revert to a more ugly
check using git branch --contains until such times as we can upgrade.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoserv.py: Give pr-server up to 5 seconds to commit data
Konrad Scherer [Fri, 15 Nov 2013 20:51:47 +0000 (15:51 -0500)] 
serv.py: Give pr-server up to 5 seconds to commit data

The default value of 0.5 seconds before sending the pr-server a
SIGTERM is not enough to guarantee that sqlite has committed all
the pr data to the database. By polling the pid to see if it is
still running, this allows the pr-server process to shutdown
cleanly and finish the final pr data commit.

Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agogit: Use merge-base instead of log for testing if a commit is present
Richard Purdie [Mon, 18 Nov 2013 17:17:16 +0000 (17:17 +0000)] 
git: Use merge-base instead of log for testing if a commit is present

The current use of git log to check if a given revision is present can be
a little fragile.

For example if revision X was on branch A, and then later added to branch
B, the update checks would not notice this since they just check for X
being in the repository.

We also had some autobuilder corruption where an older packed-refs file
was copied over a new repository containing newer pack files. There
was no update to the refs file since the revision was present but
not accessible in any branch.

The correct fix is to check that the required revisions are present
on the specific branches. This patch does this using merge-base.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker, toaster: variable definition tracking
Alexandru DAMIAN [Thu, 14 Nov 2013 13:56:30 +0000 (13:56 +0000)] 
cooker, toaster: variable definition tracking

In order to track the file where a configuration
variable was defined, this patch bring these changes:

* a new feature is defined in CookerFeatures, named
BASEDATASTORE_TRACKING. When a UI requests BASEDATASTORE_TRACKING,
the base variable definition are tracked when configuration
is parsed.

* getAllKeysWithFlags now includes variable history in the
data dump

* toaster_ui.py will record the operation, file path
and line number where the variable was changes

* toaster Simple UI will display the file path
and line number for Configuration page

There is a change in the models to accomodate the recording
of variable change history.

[YOCTO #5227]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agotoaster: task with outcome 2 (sstate), should have sstate_result!=0
Cristiana Voicu [Fri, 15 Nov 2013 11:34:46 +0000 (13:34 +0200)] 
toaster: task with outcome 2 (sstate), should have sstate_result!=0

0 (not applicable) is not a valid sstate_result for tasks with
outcome 2 (sstate), which should return 3 (restored), 2
(failed) or 1 (missed).
Sstate_result for tasks with outcome 2 is equal to the outcome
of _setscene corespondent task.

[YOCTO #5220]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob/hoblistmodel: check if vals of packages/recipes names are not None
Cristiana Voicu [Mon, 23 Sep 2013 11:11:08 +0000 (14:11 +0300)] 
hob/hoblistmodel: check if vals of packages/recipes names are not None

[YOCTO #5053]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: warn if user specifies a target listed in ASSUME_PROVIDED
Paul Eggleton [Thu, 14 Nov 2013 14:57:54 +0000 (14:57 +0000)] 
cooker: warn if user specifies a target listed in ASSUME_PROVIDED

If the user explicitly asks to build a target that is listed in the
value of ASSUME_PROVIDED, show a warning mentioning that it will be
ignored.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: refresh tables when the user is redirected to Edit packages
Cristiana Voicu [Wed, 13 Nov 2013 12:54:16 +0000 (14:54 +0200)] 
hob: refresh tables when the user is redirected to Edit packages

When the build fails and I click "Edit packages", we should be returned
to the tab we launched the build from. Hob should remember the tab,
not the search state.

[YOCTO #5257]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agotoaster: fix path to buildstats file
Alexandru DAMIAN [Thu, 14 Nov 2013 10:53:00 +0000 (10:53 +0000)] 
toaster: fix path to buildstats file

The buildstats file path changes based on the
optional PE variable that may be defined for a
recipe.

The toasterui simply ignored the PE value, and
as such it didn't correctly reach buildstats files
for some of the tasks.

This patch fixes the issue.

    [YOCTO #5073]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agotoasterui: mark failed sceneQueue tasks as failed
Alexandru DAMIAN [Thu, 14 Nov 2013 10:53:01 +0000 (10:53 +0000)] 
toasterui: mark failed sceneQueue tasks as failed

This patch addresses an issue where a failed sceneQueue task
entry was not updated on the Fail event. As a result, it
always showed the task as not-available.

    [YOCTO #5216]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agotoaster: remove author field
Alexandru DAMIAN [Thu, 14 Nov 2013 10:52:59 +0000 (10:52 +0000)] 
toaster: remove author field

The AUTHOR field in most recipes is not defined,
or it's not really consistently set in the metadata,
Also does it seem particularly useful.

This patch removes the AUTHOR variable from the
toaster system

    [YOCTO #5449]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agotoaster: fix tasks showing as NoExec
Alexandru DAMIAN [Thu, 14 Nov 2013 10:52:58 +0000 (10:52 +0000)] 
toaster: fix tasks showing as NoExec

Tasks without script type information showed by default
as NoExec; this happens for all Prebuild or Covered
tasks, as script type information comes only on TaskStarted
event. Such a default value may drive confusion, as NoExec value
should be reserved for the NoExec-flagged tasks.

This patch adds a new default value named Unknown that will be
used for all tasks that don't have script type information
available.

    [YOCTO #5327]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: replace "w" file opening mode with "a" mode
Cristiana Voicu [Tue, 12 Nov 2013 16:12:17 +0000 (18:12 +0200)] 
cooker: replace "w" file opening mode with "a" mode

Also removed some redundant file manipulation code
Based on patch sent by Stefan Stanacar <stefanx.stanacar@intel.com>

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agotoaster: convert build_package size to bytes to keep consistence
Cristiana Voicu [Tue, 12 Nov 2013 14:50:24 +0000 (16:50 +0200)] 
toaster: convert build_package size to bytes to keep consistence

[YOCTO #5503]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agonewbb.vim: fix spelling
Trevor Woerner [Mon, 11 Nov 2013 18:51:30 +0000 (13:51 -0500)] 
newbb.vim: fix spelling

Signed-off-by: Trevor Woerner <trevor.woerner@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoHOB: HIG compliant message dialogs
Valentin Popa [Mon, 4 Nov 2013 10:53:12 +0000 (12:53 +0200)] 
HOB: HIG compliant message dialogs

"More" HIG compliant dialogs for HOB.

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodepexp: Improve wording on requirements
Gary Thomas [Thu, 7 Nov 2013 17:04:21 +0000 (10:04 -0700)] 
depexp: Improve wording on requirements

Since -g is required, tell the user exactly so.

Signed-off-by: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agotoaster: fix target package information
Alexandru DAMIAN [Tue, 5 Nov 2013 12:26:46 +0000 (12:26 +0000)] 
toaster: fix target package information

Toaster needs to record information about packages
installed on a built target image, and dependencies
between these packages.

This patch fixes a bug where the variable from the
server wasn't read correctly leading which caused
the buildhistory to not be processed correctly.

Additionally, two display issues in the package table
were fixed, issues that lead to package information
being displayed incorrectly.

    [YOCTO #5197]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agotoaster: enable required classes in the toaster startup script
Alexandru DAMIAN [Fri, 1 Nov 2013 15:58:35 +0000 (15:58 +0000)] 
toaster: enable required classes in the toaster startup script

In order to use toaster, now you have to set INHERIT+="toaster buildhistory"
To keep it simple, I've done some changes in order to automate it. When toaster
is started, this line is added to a new file called toaster.conf.

This file is passed to the bitbake server with the --postread parameter.

Based on a patch by Cristiana Voicu <cristiana.voicu@intel.com>

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agotoaster: add variable description for prefixed/suffixed variables
Cristiana Voicu [Fri, 1 Nov 2013 15:58:34 +0000 (15:58 +0000)] 
toaster: add variable description for prefixed/suffixed variables

In the Configuration table, we need to link prefixed / suffixed
variables to the corresponding variable descriptions in documentation.conf.

[YOCTO #5198]

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agotoaster: server shutdown on terminal exit
Alexandru DAMIAN [Fri, 1 Nov 2013 15:58:33 +0000 (15:58 +0000)] 
toaster: server shutdown on terminal exit

If the terminal where the server was started is closed,
the bitbake server should shutdown. Currently the system
is left in hanging state.

This patch uses "trap" command to make sure the servers
are closed on terminal exit.

[YOCTO #5376]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agotoaster: fix timezone settings
Alexandru DAMIAN [Fri, 1 Nov 2013 15:58:32 +0000 (15:58 +0000)] 
toaster: fix timezone settings

This patch fixes an issue where, if not defined,
the timezone defaults to 'America/Chicago'.

The solution is to set the timezone to current computer's
timezone.

[YOCTO #5186]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: do not recreate recipecache in buildfile mode
Alexandru DAMIAN [Fri, 1 Nov 2013 15:58:30 +0000 (15:58 +0000)] 
cooker: do not recreate recipecache in buildfile mode

When building a single file, the cooker will recreate
the recipecache from scratch.

I suspect this is a remnant of past code, since:
* the current recipecache works fine
* the new recipecache will not have all the fields as
requested by HOB_EXTRA_CACHES setting

This patch disables recreating the recipecache, leading
to shorter times when building single build files
(-b option) and better compatibility with Toaster.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobuild, toaster: record proper task type
Alexandru DAMIAN [Fri, 1 Nov 2013 15:58:31 +0000 (15:58 +0000)] 
build, toaster: record proper task type

Bitbake tasks may be of type 'python' or 'shell',
or they may not be executed at all, which is record
as task type 'noexec'.

In order to record proper task type, this patch:

* creates no exec task type as the default value in
the toaster model definition

* adds full task flags to the bb.build.TaskStarted event
in build.py

* if the task actually starts, the toaster ui will
record the type of the task as either 'python' or 'shell'
based on the task flags.

[YOCTO #5073]
[YOCTO #5075]
[YOCTO #5327]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: add data to the dependency tree dump
Alexandru DAMIAN [Fri, 1 Nov 2013 15:58:29 +0000 (15:58 +0000)] 
cooker: add data to the dependency tree dump

Toaster needes to record extra data that needs to
be moved at the time of the dependency tree dump.

This data includes:
* layer priorities for recording in the layer section
* the inherit list for each PN which allows to determine
the type of the PN (regular package, image, etc).

This patch adds this data to the dependency tree dump.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agotoaster: fixes for null values from events
Alexandru DAMIAN [Fri, 1 Nov 2013 15:58:28 +0000 (15:58 +0000)] 
toaster: fixes for null values from events

Some of the data values may come of as None through the event system,
and the UI would encounter a problem saving the Configuration.
It would be trying to save these values as NULL in the
database, which is not allowed.

This patch adds more verification for data coming through
the event system.

Other minor updates:
* update for the event model from toaster.bbclass
* minor code flow fix in the event system

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: do not display the "Package list may be incomplete!" dialog
Cristiana Voicu [Mon, 28 Oct 2013 13:30:21 +0000 (15:30 +0200)] 
hob: do not display the "Package list may be incomplete!" dialog

This dialog is not needed. Instead "Edit packages" button should
redirect to Packages list.

[YOCTO #5257]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch/hg: Improve user/password handling
Volker Vogelhuber [Fri, 1 Nov 2013 17:53:09 +0000 (17:53 +0000)] 
fetch/hg: Improve user/password handling

Trying to use a server with username and password authentication
within the URL of the SRC_URI variable doesn't appear to work.

This patch adds the missing parts to the hg fetcher to make this
work properly.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: populate error_msg when hob receives a CommandFailed event
Cristiana Voicu [Fri, 1 Nov 2013 09:18:45 +0000 (11:18 +0200)] 
hob: populate error_msg when hob receives a CommandFailed event

When Hob receives a bb.command.CommandFailed event, it doesn't show any error,
because the error_msg is empty. If so, it is hard to detect the issue, because
Hob continues to run till it blocks because of an information gap.

[YOCTO #5097]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agofetch2/svn.py: use log instead of info to retrieve revision
Nicolas Dechesne [Fri, 1 Nov 2013 00:36:25 +0000 (17:36 -0700)] 
fetch2/svn.py: use log instead of info to retrieve revision

We have faced a corner case situation where the 'last changed
revision' returned from svn info is wrong. It happens when the last
revision is a directory move. e.g. if we assume that the svn
repository at revA has root/x/y/z/foo/bar and it is moved to
root/a/b/c/foo/bar in revB, then svn info 'last change revision' will
return revA. As such when using AUTOREV, we are going to attempt to
retrieve root/a/b/c/foo/bar (as per SRC_URI) but at revA when it did
not exist.

So this patch changes how we retrieve the latest revision and uses
'svn log --limit 1' which gives correct result in all tested cases.

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agomonitordisk: lower inode check warning to note
Olof Johansson [Fri, 18 Oct 2013 10:21:59 +0000 (12:21 +0200)] 
monitordisk: lower inode check warning to note

Filesystems like btrfs and reiserfs sets the inode count to 0, since
they don't have an inode concept. This is expected, and having a warning
show up every time you run bitbake can cause undue concern.

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agotoaster: add Toaster UI interface
Alexandru DAMIAN [Thu, 26 Sep 2013 11:50:50 +0000 (12:50 +0100)] 
toaster: add Toaster UI interface

Adding a new bitbake UI interface named 'toasterui'.

'toasterui' listens for events and data coming from a
bitbake server during a run, and records it
in a data store using the Toaster object model.

Adds a helper class named BuildInfoHelper that
reconstructs the state of the bitbake server and
saves relevant data to the data store.

Code portions contributed by Calin Dragomir <calindragomir@gmail.com>.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
12 years agotoaster: adding frameworks for the Simple UI
Alexandru DAMIAN [Thu, 26 Sep 2013 11:48:44 +0000 (12:48 +0100)] 
toaster: adding frameworks for the Simple UI

This commit adds the 3rd party frameworks used for the web UI.

jQuery is licensed under MIT.

Bootstrap is licensed under APACHE-2.0

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
12 years agotoaster: add toaster code to bitbake
Alexandru DAMIAN [Fri, 11 Oct 2013 12:46:23 +0000 (13:46 +0100)] 
toaster: add toaster code to bitbake

This patch adds the Toaster component to Bitbake.

Toaster is a module designed to record the progress of a
Bitbake build, and data about the resultant artifacts.

It contains a web-based interface and a REST API allowing
post-facto inspection of the build process and artifacts.

Features present in this build:
* toaster start script
* relational data model
* Django boilerplate code
* the REST API
* the Simple UI web interface

This patch has all the development history squashed together.

Code portions contributed by Calin Dragomir <calindragomir@gmail.com>.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
12 years agoutils: Don't show stack traces for BBHandledException
Richard Purdie [Thu, 17 Oct 2013 10:48:09 +0000 (10:48 +0000)] 
utils: Don't show stack traces for BBHandledException

A BBHandledException means we already showed an error to the user so
we shouldn't show a stack trace as this just confuses things further.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: bitbake: bb: Drop deprecated functions
Richard Purdie [Sat, 14 Sep 2013 17:03:48 +0000 (17:03 +0000)] 
bitbake: bitbake: bb: Drop deprecated functions

These functions in the main bb module have long been deprecated
and moved to other modules. Finally remove the compatibility links.

(Bitbake rev: ccd181c3ed4852e2b9169cf19aaf18aeacddcc18)

(Bitbake rev: d7f817518c5df2524a4bcf008ba63c71a8eb48bb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agosiggen: handle recipe path changes in siginfo files
Paul Eggleton [Tue, 8 Oct 2013 14:34:32 +0000 (15:34 +0100)] 
siggen: handle recipe path changes in siginfo files

Avoid storing paths to files in SRC_URI when writing out the the
file checksums to siginfo files. This prevents a move of the source
directory being reported by bitbake-diffsigs as files being removed and
then added (the signature itself is not affected since the file paths
have never been included in the signature).

This has required the format of the file checksums in the siginfo file
to be changed from a dict to a list of tuples (in order to handle
multiple files with the same name under different paths, which is
uncommon but possible); the code remains backwards-compatible with older
siginfo files that use a dict however.

Fixes [YOCTO #5245].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: Hob should ask for ports only when Manual proxy is selected
Cristiana Voicu [Tue, 8 Oct 2013 10:58:25 +0000 (13:58 +0300)] 
hob: Hob should ask for ports only when Manual proxy is selected

[YOCTO #5307]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker/command: Add error state for the server and use for pre_serve errors
Richard Purdie [Sun, 6 Oct 2013 12:42:39 +0000 (13:42 +0100)] 
cooker/command: Add error state for the server and use for pre_serve errors

Currently if errors occur when starting the PR service, there is a race that
occurs since the UI runs various commands including starting builds before
processing the CookerExit(). By adding the error state and refusing to run
async commands in this mode, builds are prevented from starting and the
UI reaches the exit code with the system shutting down cleanly.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: Update post 1.20 to development version
Richard Purdie [Mon, 14 Oct 2013 15:58:46 +0000 (16:58 +0100)] 
bitbake: Update post 1.20 to development version

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: change tooltip for live images
Cristiana Voicu [Mon, 7 Oct 2013 15:21:46 +0000 (18:21 +0300)] 
hob: change tooltip for live images

This change is needed to inform the user that selecting
live type means that the system will build a hddimg and iso
image.

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: replace comment added in conf files
Cristiana Voicu [Mon, 7 Oct 2013 11:28:55 +0000 (14:28 +0300)] 
bitbake: replace comment added in conf files

The patch that implements removeConfigurationVar method was made before
merging the patch that replaces "added by bitbake" with "added by hob".
This patch corrects this issue.

[YOCTO #5284]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake-dumpsig: introduce command line and error handling
Paul Eggleton [Fri, 4 Oct 2013 15:36:47 +0000 (15:36 +0000)] 
bitbake-dumpsig: introduce command line and error handling

This utility doesn't take any special arguments, but it's nice if it at
least knows how to deal with no arguments, --help and errors properly.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake-diffsigs: improve error handling
Paul Eggleton [Fri, 4 Oct 2013 15:35:29 +0000 (15:35 +0000)] 
bitbake-diffsigs: improve error handling

* Set up a logger independent of BitBake so we can log errors ourselves
* Handle common errors without printing a traceback

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake-diffsigs: refactor argument parsing slightly
Paul Eggleton [Fri, 4 Oct 2013 15:06:36 +0000 (15:06 +0000)] 
bitbake-diffsigs: refactor argument parsing slightly

* Use OptionParser to parse the two options to -t rather than trying to
  pick them out ourselves.
* Add a description shown with --help output

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake-diffsigs: handle if task name is specified without do_ prefix
Paul Eggleton [Fri, 4 Oct 2013 11:13:46 +0000 (11:13 +0000)] 
bitbake-diffsigs: handle if task name is specified without do_ prefix

Adjust the task name automatically if the -t option is specified with
a task name that doesn't start with do_ (e.g. "configure" instead of
"do_configure").

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobin/bitbake: Clarify server error message
Richard Purdie [Fri, 4 Oct 2013 13:24:50 +0000 (14:24 +0100)] 
bin/bitbake: Clarify server error message

Getting an error message about --remote-server being set when really
BBSERVER was is confusing, clarify the message.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobin/bitbake: Clear ui-queue when starting a server
Richard Purdie [Fri, 4 Oct 2013 13:17:45 +0000 (14:17 +0100)] 
bin/bitbake: Clear ui-queue when starting a server

When starting a server we don't want to show the debug event queue which
is reserved for when when errors have occurred. This patch copies the UI
code to ensure the user doesn't see confusing output.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobin/bitbake: No need to show tracebacks for BBHandledExceptions
Richard Purdie [Fri, 4 Oct 2013 13:16:15 +0000 (14:16 +0100)] 
bin/bitbake: No need to show tracebacks for BBHandledExceptions

For BBHandledExceptions, we've already displaced a sensible error to
the user so we don't need to do it again. Just exit with an error
value.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoxmlrpc: Show a better error message for connection failures
Richard Purdie [Fri, 4 Oct 2013 13:15:36 +0000 (14:15 +0100)] 
xmlrpc: Show a better error message for connection failures

Showing a traceback when unable to connect to a bitbake server is
rather ugly. This change allows us to show a sensible error message.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobin/bitbake: Catch establish connection log messages
Richard Purdie [Fri, 4 Oct 2013 13:14:52 +0000 (14:14 +0100)] 
bin/bitbake: Catch establish connection log messages

If for example you try "bitbake -m" with an invalid BBSERVER, error
messages are not displayed. This change ensures logging is in place
to catch and display such errors.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake/hob: removing extra parameters from conf files using hob
Cristiana Voicu [Fri, 4 Oct 2013 13:19:45 +0000 (16:19 +0300)] 
bitbake/hob: removing extra parameters from conf files using hob

In Hob settings, there is a tab to add/remove extra settings. This
patch implements a way to "remove" variables from conf files, through
bitbake. But, to keep the history assigment of the variables synchronized,
instead of removing, it replaces the lines with blank lines.

[YOCTO #5284]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoHOB: MACHINE should be saved in conf files using ?=
Valentin Popa [Fri, 27 Sep 2013 14:10:41 +0000 (17:10 +0300)] 
HOB: MACHINE should be saved in conf files using ?=

MACHINE var is saved using early assignment operator.
Calling  MACHINE=x bitbake core-image-... works properly.
Comment "#added by bitbake" is replaced with "#added by hob".

[YOCTO #5070]
Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoutils: use logger.warn instead of print in copyfile
Ross Burton [Wed, 2 Oct 2013 16:47:28 +0000 (17:47 +0100)] 
utils: use logger.warn instead of print in copyfile

print disappears into the ether, so use logger.warn and clean up the messages.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agolib/bb/monitordisk.py: fix spelling in error text
Erik Botö [Wed, 2 Oct 2013 14:37:37 +0000 (16:37 +0200)] 
lib/bb/monitordisk.py: fix spelling in error text

Signed-off-by: Erik Botö <erik.boto@pelagicore.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoHOB: Busy cursor when saving configuration
Valentin Popa [Tue, 10 Sep 2013 12:58:52 +0000 (15:58 +0300)] 
HOB: Busy cursor when saving configuration

Display a busy cursor while the configuration is saved.

[YOCTO #4846]
Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: Update to version 1.20.0
Richard Purdie [Tue, 24 Sep 2013 17:04:02 +0000 (18:04 +0100)] 
bitbake: Update to version 1.20.0

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agotests/data: Whitespace in key names is a really bad idea
Richard Purdie [Sat, 21 Sep 2013 10:44:16 +0000 (10:44 +0000)] 
tests/data: Whitespace in key names is a really bad idea

The parser never has supported it, the datastore API did happen to work
but whitespace in key names is a really bad idea and not something I think we
should encourage or support.

Fix test case failures after excplitly ignoring it for variable expansion
purposes.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart: Variable references don't contain newlines, spaces or tabs
Richard Purdie [Fri, 20 Sep 2013 15:26:32 +0000 (15:26 +0000)] 
data_smart: Variable references don't contain newlines, spaces or tabs

The code is happily trying to expand variable names containing newlines,
spaces and tabs which are illegal characters in variable names. This
patch stops it doing this. This will change dependency checksums
since some rather weird dependencies were being attempted to be expanded.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agohob: populate "Save image" dialog when saving changes to a custom image recipe
Cristiana Voicu [Tue, 17 Sep 2013 10:51:14 +0000 (13:51 +0300)] 
hob: populate "Save image" dialog when saving changes to a custom image recipe

If my build starts from a YP standard image recipe, the 'Save image
recipe' dialog should be empty.

If my build starts from a custom image recipe, the 'Save image recipe'
dialog should populate the 'Name' and 'Description' fields with the values
set for the custom image recipe.

[YOCTO #5004]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobin/bitbake: Improve --help text
Richard Purdie [Wed, 18 Sep 2013 22:12:10 +0000 (22:12 +0000)] 
bin/bitbake: Improve --help text

The --help text was rather inconsistent in style and plain incorrect in places,
using confusing terminology in others. I guess most people know what the options
do and don't read this but its confusing to new users.

This updates it to use the terms recipe and task consistently, remove
the references to stage, bbread and generally try and make the output
more useful.

[YOCTO #4856]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobuild: Add BB_TASK_NICE_LEVEL to task code
Richard Purdie [Fri, 20 Sep 2013 09:54:40 +0000 (09:54 +0000)] 
build: Add BB_TASK_NICE_LEVEL to task code

On Linux its not possible for processes to regain a previous nice level after
it has changed. Its therefore not possible to have a core low priority and
then raise the priorities of individual tasks.

This variable allows us to do something like:

BB_TASK_NICE_LEVEL = "5"
BB_TASK_NICE_LEVEL_task-testimage = "0"

to give priority to specific tasks which the BB_NICE_LEVEL functionality
doesn't give us the option of.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: runqueue: add task hash to Queue events
Alexandru DAMIAN [Wed, 18 Sep 2013 12:15:53 +0000 (13:15 +0100)] 
bitbake: runqueue: add task hash to Queue events

Adding the sstate-related hash for all runqueue and
scenequeue tasks, as it's needed in the WebHob data.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: event: adding generic event for metadata usage
Alexandru DAMIAN [Wed, 18 Sep 2013 12:15:52 +0000 (13:15 +0100)] 
bitbake: event: adding generic event for metadata usage

Adding the generic bb.event.MetadataEvent that is
targeted specifically at metadata usage. This is
needed in order to let the metadata code send and receive
events during asynchrous execution without having
to define each event specifically in Bitbake.

Metadata code should subscribe to and fire the MetadataEvent
in order to communicate asynchronously, and identify
the object using event.type field, and parse the
data in the event.data field.

Knotty UI will ignore these event by default.

This deprecates RequestPackageInfo/PackageInfo, and that
event pair will be removed in the future.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: cooker, command: add a command to return global data
Alexandru DAMIAN [Wed, 18 Sep 2013 12:15:51 +0000 (13:15 +0100)] 
bitbake: cooker, command: add a command to return global data

Adding the 'getAllKeysWithFlags' read-only command that will
return a dump of the global data state, together with specified
flags for each key. The flag list is passed in as the first
parameter to the command.

This will be used by UI clients to get the build configuration.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: cooker: get extra information from recipe cache
Alexandru DAMIAN [Wed, 18 Sep 2013 12:15:50 +0000 (13:15 +0100)] 
bitbake: cooker: get extra information from recipe cache

The loaded cache modules may add extra attributes to
the recipecache, that will be populated by the cache
classes required by the UI. These attributes
will be used by the UI to display relevant information.

Adds cachefields cache class field to specify
for each cache class which attributes will be set
in the recipecache.

Adds code to automatically expand depends tree with the
fields exported by the extra cache class.

Fixes a cache field name in the HOB UI.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: build, runqueue: adds info to the *runQueue* events
Alexandru DAMIAN [Wed, 18 Sep 2013 12:15:49 +0000 (13:15 +0100)] 
bitbake: build, runqueue: adds info to the *runQueue* events

This patch adds task identifying information for all
runQueue and sceneQueue events, and for bb.build.Task* events.
This will allow matching event to specific tasks in the UI
handlers processing these events.

Adds RunQueueData functions to get the task name and task
file for usage with the runQueue* events.

Adds taskfile and taskname properties to bb.build.TaskBase.

Adds taskfile and taskname properties to the *runQueue* events

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: cooker,runqueue: send the task dependency tree
Alexandru DAMIAN [Wed, 18 Sep 2013 12:15:48 +0000 (13:15 +0100)] 
bitbake: cooker,runqueue: send the task dependency tree

Adding a CookerFeature that allows UIs to enable
receving a dependency tree once the task data has been
computed and the runQueue is ready to start.

This will allow the clients to display dependency
data in an efficient manner, and not recompute the runqueue
specifically to get the dependency data.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: cooker,xmlrpc,servers: implement CookerFeatures
Alexandru DAMIAN [Wed, 18 Sep 2013 12:15:47 +0000 (13:15 +0100)] 
bitbake: cooker,xmlrpc,servers: implement CookerFeatures

Implementing feature set selection that allows a client
to enable specific features in the server at connection time.

Only enabling of features is supported, as there is
no way to safely remove data loaded into the cooker.
Once enabled, a feature will remain enabled for the
life of the cooker.

Client-server connection now supports specifying the feature
set required by the client. This is implemented in the Process
server using a managed proxy list, so the server cooker
will now load dynamically needed features based on what client
connects to it.

In the XMLRPC server the feature set is requested by
using a parameter for registerUIHandler function.
This allows observer-only clients to also specify features
for the server.

The server code configuration now is completly separated
from the client code. All hardcoding of client knowledge is
removed from the server.

The extra_caches is removed as the client can now specify
the caches it needs using the feature. The UI modules
now need to specify the desired featureSet. HOB is modified
to conform to the featureSet specification.

The only feature available is CookerFeatures.HOB_EXTRA_CACHES
which forces loading the bb.cache_extra:HobRecipeInfo class.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart: Fix variable reference issues
Richard Purdie [Wed, 18 Sep 2013 12:23:54 +0000 (12:23 +0000)] 
data_smart: Fix variable reference issues

The change to use the expansion cache in VariableParse was incorrect as
it was adding in references it shouldn't have been. This patch corrects
the codepaths and ensures the references are correct.

The cache version is bumped since the previous bug could have leave
to invalid checksum calculations and a clean cache is therefore desireable.

The impact of the bug was that sstate was not getting reused when it should
and some tasks were also being rerun when they should not have been.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: return a copy checkPackages
Richard Purdie [Wed, 18 Sep 2013 07:38:44 +0000 (07:38 +0000)] 
cooker: return a copy checkPackages

The syntax used for checkPackages implies a copy is returned but it
did not do so. Make it so.

This is fixes universe builds where error messaages were being shown
but there should have only been warnings.

[YOCTO #5222]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agousermanual.xml: Two new sections added to BitBake "Description"
Scott Rifenbark [Tue, 17 Sep 2013 21:02:18 +0000 (14:02 -0700)] 
usermanual.xml: Two new sections added to BitBake "Description"

1. Added a new section "Appending and Prepending (override style
   syntax)".  This section shows how the append and prepend operators
   work using the override style syntax.

2. Added a new section "Removing (override style syntax)".  This
   section describes the new "_remove" operator.

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoRevert "bb.fatal: Raise a BBHandledException instead of exiting"
Richard Purdie [Tue, 17 Sep 2013 18:15:26 +0000 (19:15 +0100)] 
Revert "bb.fatal: Raise a BBHandledException instead of exiting"

Sanity test failures are no longer fatal with this change so whilst
its the right idea, the code paths need more work.

This reverts commit a50017ba71250e1710a6425b60ac7e3f03d88295.

12 years agobb.fatal: Raise a BBHandledException instead of exiting
Richard Purdie [Sat, 14 Sep 2013 16:59:24 +0000 (16:59 +0000)] 
bb.fatal: Raise a BBHandledException instead of exiting

With new bitbake UIs having the cooker exit at 'random' points
in the codebase is problematic. This patch raises an exception
which matches the siutation instead.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata: Optimise flag exclusion list handling
Richard Purdie [Mon, 16 Sep 2013 07:54:58 +0000 (07:54 +0000)] 
data: Optimise flag exclusion list handling

Move the variable lookup to the outer loop for performance, replacing
a now unneeded parameter (after the previous changes).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata: Optimise flag lookup in build_dependencies
Richard Purdie [Mon, 16 Sep 2013 07:53:40 +0000 (07:53 +0000)] 
data: Optimise flag lookup in build_dependencies

When looking up flag variable dependencies, large chunks of the function
aren't needed. Optimise the function flow accordingly for speed.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata: Optimise build_dependencies a little
Richard Purdie [Mon, 16 Sep 2013 07:51:18 +0000 (07:51 +0000)] 
data: Optimise build_dependencies a little

Instead of multiple calls to getVarFlag, make one call to getVarFlags, only expanding
the flags that need to be expanded. This improves performance.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart: Cache the fact a variable accesses another even if its unset
Richard Purdie [Mon, 16 Sep 2013 07:45:50 +0000 (07:45 +0000)] 
data_smart: Cache the fact a variable accesses another even if its unset

If a variable references another but it isn't set at present, the
reference wasn't stored. It really should be marked as a reference
and the higher level dependency code can handle as appropriate.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart: Allow flags to use the expand cache
Richard Purdie [Mon, 16 Sep 2013 07:45:20 +0000 (07:45 +0000)] 
data_smart: Allow flags to use the expand cache

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart: Allow expansion of flags in getVarFlags
Richard Purdie [Mon, 16 Sep 2013 07:43:30 +0000 (07:43 +0000)] 
data_smart: Allow expansion of flags in getVarFlags

Allow a list of flags to expand to be passed into getVarFlags. This
is useful within bitbake itself to optimise performance of the
dependency generation code.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart: Add explict None checks
Alexandru DAMIAN [Mon, 16 Sep 2013 07:40:20 +0000 (07:40 +0000)] 
data_smart: Add explict None checks

Simple if xxx checks end up calling len(xxx). We're interested in the specific case
of None which means we can break out the iterator much earlier after the first
item. This adds in the specific tests for None in what is a hot path in the
data store code which gives small performance gains.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata: Cache an list of export variables
Richard Purdie [Mon, 16 Sep 2013 07:36:42 +0000 (07:36 +0000)] 
data: Cache an list of export variables

Compute a cache of the list of potential export variables so
that we don't have to compute the list from scratch.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata: Use direct iteration, not keys()
Richard Purdie [Mon, 16 Sep 2013 07:33:48 +0000 (07:33 +0000)] 
data: Use direct iteration, not keys()

Profiling shows the creation of keys() has overhead and we're better using
an iterator rather than the memory associated with the huge list of keys
when iterating the whoe datastore. We minimise the number of times
we do this to twice only per recipe.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart: use the expand_cache in VariableParse
Richard Purdie [Mon, 16 Sep 2013 07:25:08 +0000 (07:25 +0000)] 
data_smart: use the expand_cache in VariableParse

When in VariableParse, use the expand_cache if possible rather than looking
up data. Ultimately it would come from the same place but this short cuts
a heavily used code block for speed improvements.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart: Improve variable expansion regexp
Richard Purdie [Mon, 16 Sep 2013 07:21:32 +0000 (07:21 +0000)] 
data_smart: Improve variable expansion regexp

Debugging showed the variable expansion regexp was catching python
expressions (starting with @). Since these are caught by their own
dedicated regexp, stop matching these for the plain variable expansion
for small performance improvements.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agosiggen: Use lookup cache exclusively
Richard Purdie [Mon, 16 Sep 2013 07:18:34 +0000 (07:18 +0000)] 
siggen: Use lookup cache exclusively

All the values we need are already guaranteed to be in the lookupcache
so rather than fetch variables again, just use the cache. This gives a
small performance improvement and simplifies the code.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata: Be explicit in data_db check
Richard Purdie [Mon, 16 Sep 2013 07:13:38 +0000 (07:13 +0000)] 
data: Be explicit in data_db check

The if statement current causes the size of parent to be calcuated which
is like a len() operation on a datastore. Since we're only interested
whether the value is none, checking explictly for this gives a
small performance gain.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: Allow profiling of the parser in profile mode
Richard Purdie [Sun, 15 Sep 2013 08:57:02 +0000 (08:57 +0000)] 
cooker: Allow profiling of the parser in profile mode

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: Avoid duplication for taskdata creation
Alexandru DAMIAN [Mon, 16 Sep 2013 22:50:56 +0000 (22:50 +0000)] 
cooker: Avoid duplication for taskdata creation

Clean-up to avoid duplication and promote code reuse to factor
taskdata creation into a common function.

[RP: minor tweaks]

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agorunqueue: add runQueueTaskSkipped event
Alexandru DAMIAN [Mon, 16 Sep 2013 12:46:01 +0000 (12:46 +0000)] 
runqueue: add runQueueTaskSkipped event

Adding a runQueueTaskSkipped to notify that the tasks that are not
run either because they are set-scened or they don't need an update
(timestamp was ok).

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobuild: Add logfile to add TaskBase events
Richard Purdie [Sat, 14 Sep 2013 16:54:09 +0000 (17:54 +0100)] 
build: Add logfile to add TaskBase events

We add the path to the logfile for all Task events except TaskInvalid
so that we can trace back the logfile locations at some future point.

TaskInvalid doesn't ever have a logfile.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: updateCache should rause exceptions, not sys.exit
Richard Purdie [Fri, 13 Sep 2013 16:34:42 +0000 (17:34 +0100)] 
cooker: updateCache should rause exceptions, not sys.exit

Exiting from the server is antisocial, instead we should raise an exception. This
will correctly fail the current command and reset the server state. We use
the handled exception since for these conditions to occur, something was
already displayed to the user.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agoknotty: Cleanup error/interruption handling
Richard Purdie [Fri, 13 Sep 2013 16:34:06 +0000 (17:34 +0100)] 
knotty: Cleanup error/interruption handling

Only display a CommandFailed ERROR: message if there is an error to display.

Only display an errors summary if we actually displayed errors.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocommand: Treat empty messages as failures, not CommandCompleted
Richard Purdie [Fri, 13 Sep 2013 16:33:30 +0000 (17:33 +0100)] 
command: Treat empty messages as failures, not CommandCompleted

Empty messages should trigger CommandFailed, not CommandCompleted as
otherwise the exit code will be incorrect.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker/command: Add finishcommand to reset cooker state
Richard Purdie [Fri, 13 Sep 2013 16:32:53 +0000 (17:32 +0100)] 
cooker/command: Add finishcommand to reset cooker state

After running a command on the server, it needs to reset to the initial
state. This ensures that subsequent clients start from a known state
and notice any configuration changes.

Ultimately we may want to do more than this buts a good start and better
than nothing.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: Rename confusing 'stop' state to 'forceshutdown'
Richard Purdie [Fri, 13 Sep 2013 16:31:54 +0000 (17:31 +0100)] 
cooker: Rename confusing 'stop' state to 'forceshutdown'

The shutdown state causes the server to finish what its doing, stop was
them meant to completely stop it. It doesn't mean the server is stopped
though. Renaming the current stop event for forceshutdown gives more
meaning to what it actually does. The stopped namespace then becomes
available to indicate a completely stopped server.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: Clean up init/reset configuration code
Richard Purdie [Fri, 13 Sep 2013 16:31:09 +0000 (17:31 +0100)] 
cooker: Clean up init/reset configuration code

Currently the cooker event data isn't rebuilt upon reset and the cache
configuration cannot be changed after init. These are both bad things
and this patch refactors the init/reset code so that it is possible
to reconfigure the server.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agocooker: Drop obsolete worker test
Richard Purdie [Fri, 13 Sep 2013 16:30:18 +0000 (17:30 +0100)] 
cooker: Drop obsolete worker test

This call only ever happens in cooker context now so we can drop the
nasty worker check from here.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agobitbake: xmlrpc: delete unused code BitBakeUIEventServer
Alexandru DAMIAN [Mon, 9 Sep 2013 16:41:03 +0000 (17:41 +0100)] 
bitbake: xmlrpc: delete unused code BitBakeUIEventServer

BitBakeUIEventServer is an unused class that pushes UI
events over a separate thread.

The current version of XMLRPC server works just fine with
the classic UI event handlers, so this class is not needed.

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12 years agodata_smart: Account for changes in append/prepend/remove in the config hash
Richard Purdie [Thu, 12 Sep 2013 13:06:22 +0000 (13:06 +0000)] 
data_smart: Account for changes in append/prepend/remove in the config hash

bitbake wasn't reparsing when _remove items were added to its configuration
and equally, appends/prepends were also being badly tracked. This
change enrures these variables are accounted for in the configuration
hash.

[YOCTO #5172]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>