Commit Graph

2440 Commits

Author SHA1 Message Date
Robert Yang 6a92f7ede3 bitbake: fetch2/__init__.py: let try_mirror_url return correct value
The fetcher will try:

1) PREMIRROR
2) Upstream
3) MIRROR

If it fails to download from the Upstream, but succeeds from the MIRROR,
and ud.localpath != origud.localpath (for example, the git tarball),
then we will get the error (e.g.: xf86-video-omapfb):

ERROR: Function failed: Fetcher failure for URL: 'xxx'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /path/to/log.do_fetch.28024

It should not show the error and let the build go on since it succeeds.
(e.g.: xf86-video-omapfb)

[YOCTO #5686]

(Bitbake rev: 3bb3f1823bdd46ab34577d43f1e39046a32bca77)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-06 16:16:33 +01:00
Richard Purdie 8a5af7ff33 bitbake: fetch2: Fix mirror repo tarball creation
A typo was meaning that the mirror creation method wasn't being called
when it should have been. Fix the type to fix mirror tarball creation.

[YOCTO #5284]

(Bitbake rev: 66cdc2e21660847c50317e8bfd28cf3595422e28)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-05-06 16:16:33 +01:00
Richard Purdie 50e9ccb2af bitbake: bitbake: fetch2/git: Anchor names when using ls-remote
When specifying tags, they're searched for unanchored so foo/bar could
match:

refs/heads/abc/foo/bar
refs/heads/xyz/foo/bar
refs/heads/foo/bar

This change anchors the expressions so they are based against heads
or tags (or any other base level tree that has been created).

(Bitbake master rev: df2e0972cd1db7abd5ec8b7cb295fb0c42e284a4)

(Bitbake rev: da93afe9834e137ed1e9410380181286c80198b5)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-19 11:04:48 +01:00
Martin Jansa e8dfafda71 bitbake: fetch2: Don't allow '/' in user:pass, fix branch containing '@'
* currently decode_url regexp parses branch=@foo as username so it ends like this:
  - ('git', '', 'foo', 'git.openembedded.org/bitbake;branch=', '', {})
  + ('git', 'git.openembedded.org', '/bitbake', '', '', {'branch': '@foo'})
* http://hg.python.org/cpython/file/2.7/Lib/urlparse.py also assumes
  that there is at least one '/' as separator between netloc and path,
  params, so it looks reasonable to prevent including '/' in username

(Bitbake rev: 3c694e20df3b1d442603300786580e4b2f4bf5f3)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-17 14:44:30 +00:00
Cristiana Voicu 8c102dba49 bitbake: hob/hoblistmodel: check if vals of packages/recipes names are not None
[YOCTO #5053]

(Corresponds to BitBake master rev: ba9fe77e37be31e8246431578902e871dd94515e)

(Bitbake rev: a1ced88ae46926e28005b83a74eaf89d70dc2b74)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-08 17:41:17 +00:00
Richard Purdie 9cea2e49d0 bitbake: imagedetailspage: Fix crash with more than 15 layers
If you had more than 15 layers the system would crash since one more
value is added to one array than the other. This fixes the code
so equal numbers of values are added to the arrays and hence
doesn't crash when many layers are enabled.

(Bitbake rev: ae420d37fd57a567cf3d2d8096cc9aa28ed01385)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-02 13:08:48 +00:00
Richard Purdie 564c687c2a bitbake: parse/ConfHander/BBHandler/utils: Fix cache dependency bugs
Currently bitbake only adds files to its dependency list if they exist.
If you add 'include foo.inc' to your recipe and the file doesn't exist,
then later you add the file, the cache will not be invalidated.

This leads to another bug which is that if files don't exist and then
you add them and they should be found first due to BBPATH, again the
cache won't invalidate.

This patch adds in tracking of files we check for the existence of so
that if they are added later, the cache correctly invalidates. This
necessitated a new version of bb.utils.which which returns a list of
files tested for.

The patch also adds in checks for duplicate file includes and for now
prints a warning about this. That will likely become a fatal error at
some point since its never usually desired to include a file twice.

The same issue is also fixed for class inheritance. Now when a class
is added which would be found in the usual search path, it will cause
the cache to be invalidated.

Unfortunately this is old code in bitbake and the patch isn't the
neatest since we have to work within that framework.

[YOCTO #5611]
[YOCTO #4425]

(Bitbake rev: 22e6b1c4c4afb27057689bbc94cbdf1f19f93e3d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-02 13:08:47 +00:00
Richard Purdie 54534a6100 bitbake: data: Fix output inconsistencies for emit_var
VAL = ""     (not shown)
VAL = " "    (shown as "")
VAL = " x"   (shown as "x")

would all show up rather differently to what would be expected in the
bitbake -e output. This fixes things so they appear consistently.

The output for running some shell functions may also change slightly
but shouldn't change in a way that is likely to cause problems.

[YOCTO #5507]

(Bitbake rev: 9f37afff200d748beddc2a70f55a72c2714e3120)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-02 13:08:47 +00:00
Richard Purdie faef2d9588 bitbake: runqueue/bitbake-worker: Fix dry run fakeroot issues
When using the dry run option (-n), bitbake would still try and fire
a specific fakeroot worker. This is doomed to failure since it might
well not have been built.

Add in some checks to prevent the failures.

[YOCTO #5367]

(Bitbake rev: 78ae96e667d3fbb8649fe25eb073e15a99d61cc8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-01-02 13:08:47 +00:00
Richard Purdie 64fc47ba12 bitbake: bitbake: runqueue: Fix hole in setsceneverify skipped task logic
We have do_bundle_initramfs which is a task inserted after compile and
before build. It is not covered by sstate.

If we run a build with a valid sstate cache present, the setsceneverify
function realises it will rerun the do_compile step (due to the
bundle_initramfs task) and hence marks do_populate_sysroot to rerun.
do_install, a dependency of do_populate_sysroot is left as marked as
covered by sstate.

What we need to do is traverse the dependency tree for any setsceneverify
invalided task and ensure any dependencies are also invalidated. We can
stop at any point we reach another setscene task though.

This means the do_populate_sysroot task has the data from do_install
available and doesn't crash.

(Bitbake master rev: f21910157d873c030b149c4cdc5b57c5062ab5a6)

(Bitbake rev: 1484905373ad717cedcaef37a0addde034ebdc60)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-11 14:16:04 +00:00
Peter Seebach 43c1b32b2c bitbake: bitbake: build.py: add single-quotes around already-expanded directory name
If the computed name of a directory contains an undefined variable
reference, bitbake dutifully creates a directory with a name that has
${...} in it. However, the actual task script created then tries to cd
to that directory, and the cd command fails, because no such directory
exists -- because the shell has helpfully removed the ${...} which did
not match any actual variables.

Since we want the name to be used exactly-as-is, add single quotes around
the name so this doesn't cause strange failures running tasks, which
allows us to progress past such failures and get to a point where they
can be diagnosed.

(Bitbake master rev: 2809c2e6f2f35f9b08058950be896947ab5a0284)

(Bitbake rev: 3059ee335b7ae1bf77d6fd02e66ea5ba37d96c7b)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-11 14:16:04 +00:00
Richard Purdie 53ce38bd0f bitbake: bitbake: fetch2: Fix handling of SCM mirrors in MIRRORS
If an SCM mirror is in PREMIRRORS, the tarball is downloaded and then found
by the "upstream" check and handled correctly.

If an SCM mirror is in MIRRORS, the tarball is downloaded but not used
since there is no "upstream" run after MIRRORS completes. It therefore
sits there useless and unused. This code change forces the upstream to
run after a mirror tarball is found and fixes the usage of SCM mirrors
in MIRRORS.

(Bitbake master rev: a66ee0994645aa5658b2f5ea134ed17d89f8751a)

(Bitbake rev: 98d2cd8576a8d035e2b073cd54bb737a3c22bc4d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-11 14:16:03 +00:00
Olof Johansson c53d0d4786 bitbake: bitbake: 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.

(Bitbake master rev: f3ac2d3678f48c68a250a0a20c08cf8687322d38)

(Bitbake rev: 04e2a1e4e3b3580660cdd3926caadeb0a9fbd4d3)

Signed-off-by: Olof Johansson <olof.johansson@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-11 14:16:03 +00:00
Richard Purdie 9d5052d3ec bitbake: bitbake: 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.

(Bitbake master rev: 42fa34142ea685f91115a551e74416ca28ef1c91)

(Bitbake rev: bc2e0796c1846d1567db6343b24b85fd7dba9163)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-11 14:16:03 +00:00
Richard Purdie 53d2563ff1 bitbake: perforce: Fix path subdirectory issues
With a SRC_URI = " \
p4://depot/folder/...;module=localfolder/localsubfolder;changeslist=${P4CHANGELIST} \
"

the subfolders of //depot/folder/... get renamed when mapped to the
local folder structure. They lose the first 3 letters. This
patch fixes that.

Issue reported by and patch sent from katutxakurra@gmail.com

[YOCTO #5380]

(Bitbake master rev: 40e06dc459d9c0b5d42d65b2d2c846196fd36b1f)

(Bitbake rev: df0f92cdc925fe7f3bb2e6afe76cf10b0656ead6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:51:31 +00:00
Volker Vogelhuber c5989a9e51 bitbake: 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.

(Bitbake master rev: dc3d6d73e44802c203b3f7247f6f212acc2f69bf)

(Bitbake rev: 76b50d0d72c4e2b03fc53fade255e87c1922e88d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:51:31 +00:00
Nicolas Dechesne 1c8c9f1e53 bitbake: 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.

(Bitbake master rev: 17d8ef0b813a05c231e3dbe6e8bc82a4a9b1d2f8)

(Bitbake rev: d14e532f07f31b99c55bec9d87470eb54251c8db)

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:51:31 +00:00
Cristiana Voicu 5445f71fc8 bitbake: 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.

(Bitbake rev: 5051f59976de4e099bb434aeea414de5a67a069f)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 16:25:02 +01:00
Cristiana Voicu 81e678bc0a bitbake: 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]
(Bitbake rev: 42601a5edef0316767b952b162123534aa8fee18)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 12:52:05 +01:00
Paul Eggleton 3c5b6af991 bitbake: 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.

(Bitbake rev: 0cabdf1d0cde6687bc1372675a0d6242587c87a0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:35 +01:00
Paul Eggleton e57bd62e17 bitbake: 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

(Bitbake rev: 77b5f5b8dca4deebb06eeb06a8e7f2ccdbfff46f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:35 +01:00
Paul Eggleton e0e30c6239 bitbake: 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

(Bitbake rev: daab42d19463b4108968fc88b207936e5ac84154)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:34 +01:00
Paul Eggleton 7c72144419 bitbake: 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").

(Bitbake rev: d182cbc63745303ef2dc9fa2cbbf5d87a68e0b52)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:34 +01:00
Richard Purdie f18194c088 bitbake: bin/bitbake: Clarify server error message
Getting an error message about --remote-server being set when really
BBSERVER was is confusing, clarify the message.

(Bitbake rev: d7b5938a30a9b0ed83f899a06a88786e8392f8bd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:34 +01:00
Richard Purdie 06afe1fafe bitbake: 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.

(Bitbake rev: a886cda58415085981646fb9a024fa7641f55865)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:34 +01:00
Richard Purdie 266a7d8c97 bitbake: 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.

(Bitbake rev: 1ff5ec26eba70ab1c85674a60b7dac77317bf349)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:34 +01:00
Richard Purdie 22d5782ef5 bitbake: 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.

(Bitbake rev: 26913202f83fbbecdce95da59515af102bcde4a7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:34 +01:00
Richard Purdie a333693c7f bitbake: 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.

(Bitbake rev: 719808f95adc7820fcc09743c592513414d03ce1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:34 +01:00
Cristiana Voicu ee7e64f116 bitbake: 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]
(Bitbake rev: bd720fb63cef6b399619b8fbcaeb8d7710f2d6df)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:34 +01:00
Valentin Popa 45392cc67a bitbake: 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]
(Bitbake rev: 2d0ec8ff083b636a6cf98de3278900eb95c3def6)

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:33 +01:00
Ross Burton 95915910df bitbake: utils: use logger.warn instead of print in copyfile
print disappears into the ether, so use logger.warn and clean up the messages.

(Bitbake rev: 90f91f7402ff69f3fe9fba5f94a53d371303ce34)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:33 +01:00
Erik Botö 56f39bcf22 bitbake: lib/bb/monitordisk.py: fix spelling in error text
(Bitbake rev: 78efda1224a99ed3d2ca6befb9fd719d82f6b0ae)

Signed-off-by: Erik Botö <erik.boto@pelagicore.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-02 15:41:21 +01:00
Valentin Popa b43c8126de bitbake: HOB: Busy cursor when saving configuration
Display a busy cursor while the configuration is saved.

[YOCTO #4846]
(Bitbake rev: fdb2e0120f189e97b8fdb6eb72d77a3100ba3018)

Signed-off-by: Valentin Popa <valentin.popa@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-30 22:11:58 +01:00
Richard Purdie 3059b09223 bitbake: bitbake: Update to version 1.20.0
(Bitbake rev: 2666865a27cedbffc82800b4cab1d6cff5a0222e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-24 18:04:16 +01:00
Richard Purdie d4b9713ec6 bitbake: 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.

(Bitbake rev: a2074ddaba6f53962d6caf34dbd27bdbc259935b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:45 +01:00
Richard Purdie d9955a14fa bitbake: 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.

(Bitbake rev: 37e13b852b33d98fa40f49dc1e815b3bbe912ff0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:45 +01:00
Cristiana Voicu 3c41bea907 bitbake: 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]
(Bitbake rev: 10757c529fe0b4b9a39740d269831347a3aab4a0)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:45 +01:00
Richard Purdie d28b1816e9 bitbake: 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]

(Bitbake rev: 516311946c7bd14c84947dc44c3bb0563e5a9667)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:45 +01:00
Richard Purdie 35a1d37ac8 bitbake: 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.

(Bitbake rev: 94d82997220c6cfc7028f76719df028ba8254a5c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:44 +01:00
Alexandru DAMIAN ace48c2866 bitbake: 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.

(Bitbake rev: b6e2ce1cf7a0ede890f08fabf536a556dc4263c5)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:44 +01:00
Alexandru DAMIAN 24ae636fde bitbake: 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.

(Bitbake rev: ae1ea51aaab73e010d1c3db39df058bebebc11dd)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:44 +01:00
Alexandru DAMIAN a05d474e5a bitbake: 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.

(Bitbake rev: 3e094da513e1220319288806cb76ddf804772afd)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:44 +01:00
Alexandru DAMIAN 0c51d610e1 bitbake: 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.

(Bitbake rev: 47c171005fb3803d936e65fcd4436c643883ae16)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:44 +01:00
Alexandru DAMIAN 5ee82d4048 bitbake: 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

(Bitbake rev: b4a5e4be50d871a80dbe0993117d73f5ad82e38f)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:44 +01:00
Alexandru DAMIAN f7621f47d8 bitbake: 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.

(Bitbake rev: 75466a53b6eece5173a9bfe483414148e4c06517)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:43 +01:00
Alexandru DAMIAN ba83eb315d bitbake: 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.

(Bitbake rev: 98e594837aab89ea042cfa9f3740d20a661b14e2)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-22 12:19:43 +01:00
Richard Purdie f1ff3c2fdc bitbake: 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.

(Bitbake rev: 8a42d082315bd6ce091d006bf83476db257fa48b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-18 13:27:30 +01:00
Richard Purdie eaf06bc284 bitbake: 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]

(Bitbake rev: 97db2a0792d605f27d434bc6a4acce52857deee1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-18 08:41:55 +01:00
Scott Rifenbark 825cfeb2e6 bitbake: 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.

(Bitbake rev: 6983afab0ce8d82d102142636d5a570f7d86a844)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17 22:27:56 +01:00
Richard Purdie bb939628ec bitbake: 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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-09-17 19:16:10 +01:00