Commit Graph

1287 Commits

Author SHA1 Message Date
Joshua Lock 15689067a4 ui/crumbs/hobeventhandler: emit a signal when there's a fatal-error
If the cooker encounters an error we're unable to proceed so emit a signal
so that UI's can notify the user and exit.

(Bitbake rev: b6f6edd5090e933ac97a65f93ea9d1b255fca811)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-02 22:31:42 +01:00
Joshua Lock ade2a27179 hob: unset busy cursor on exit
Prevent the busy cursor being shown after hob exits if quit is called
whilst the busy cursor is set.

(Bitbake rev: 7b977ff222d4a318efabd0ca5f37fa03b9acb996)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-02 22:31:42 +01:00
Joshua Lock 639e9d9481 ui/crumbs/hobeventhandler: remove unused code
Remove some unused variables and methods.

(Bitbake rev: b1b02d523c6281615b72255774ed455b4cae4847)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-02 22:31:41 +01:00
Joshua Lock 990b587652 hob: fix save/restore of toolchain preferences
Add some (namespaced) custom variables to the configuration file for sake
of this UI.

(Bitbake rev: c9dd2592434338bdddb3cc6f42e760c86fa9e6bb)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-01 16:49:09 +01:00
Joshua Lock 42fe3c6131 hob: more reliable disabling of GPLv3 packages
1. reflect GPLv3's presence in INCOMPATIBLE_LICENSE value in the UI

The hob UI currently only supports GPLv3 as a value for
INCOMPATIBLE_LICENSE but doesn't properly reflect whether the value is
already set. This patch rectifies this.

2. don't stomp over other INCOMPATIBLE_LICENSE values when disabling GPLv3

In case the user has other values set for INCOMPATIBLE_LICENSE we don't
want to overwrite the value, we want to modify it.

Fixes [#1286]

(Bitbake rev: 68b992922bc7148d657a1c706c6acc67812a87c0)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-01 16:49:09 +01:00
Paul Eggleton 5d3538554b bitbake/providers: list PREFERRED_VERSION candidates when unavailable
If the specified PREFERRED_VERSION is not available then list the
available versions in the output. (PR is omitted.)

(Bitbake rev: eea5ff9f34bb9b2e29f5fa43deb80d4aa6ef7ddc)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27 16:54:05 +01:00
Paul Eggleton 965fbe483b bitbake/taskdata: fix incorrect usage of rdependees instead of dependees
This looked like a copy-paste error - the code around is dealing with
depends and not rdepends.

(Bitbake rev: bb688635c2050da3cbbaa5aa5b00e882887695de)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27 16:54:04 +01:00
Paul Eggleton daed107ce1 bitbake: show more information for NoProvider errors
"Nothing PROVIDES" errors often come up when a recipe has been skipped
for some reason, and therefore it is useful to print out that reason
information when showing the error so that the user understands why the
error has occurred.

Given that we already feed the reason information into the skiplist for
various situations (COMMERCIAL_LICENSE, COMPATIBLE_MACHINE etc.) this
should now output a useful error message for skipped recipes.

Fixes [YOCTO #846], [YOCTO #1127]

(Bitbake rev: 6765218430e31c165888f26fbc75023c89a6eab2)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27 16:54:04 +01:00
Jessica Zhang 60218d19f7 ui/crumbs/hobprefs: trigger reparse when package format changed
reload_data after package format change to make the change take effects in
next build.

Fixes [YOCTO #1287].

(Bitbake rev: fb47c7452455f3f8d943b21dd61300ec55eea141)

Signed-off-by: Jessica Zhang <jessica.zhang@intel.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27 16:54:04 +01:00
Joshua Lock cd4141f1a7 cooker: populate rdepends-pkg in generatePkgDepTreeData
The rdepends-pkg field of the generated depend_tree model was not populated
in the original implementation of this method, this series adds in the
loop to populate the rdepends-pkg column of the model.

(Bitbake rev: 4f9a6f6f43cf2ef38115285897fbbde01964e892)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27 16:54:04 +01:00
Joshua Lock b004d8ef0f hob: fix loading customised image recipe
The signal handler of the 'Base image' combo was still connected during load
such that updating the UI to reflect the loaded base image triggered a change
of the model. Fix this by disconnecting the signal handler when updating the
displayed 'Base image'.

Fixes [YOCTO #1282]

(Bitbake rev: 58036a79cb79d1dff307e2cfed0e684493178507)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27 16:54:04 +01:00
Joshua Lock 6b109860bf ui/crumbs/tasklistmodel: work around overly aggressive package removal
The mark() method, which removes dependent and rdependent items, is overly
aggressive removing items which are actually required by user selected
items and then causing a removal of those items. Because the data
structures used are not fine grained enough to do more intelligent
dependency tracking the simplest "fix" is to track removals which are
marked as "User Selected" and re-add those (and therefore their
dependencies) once the aggressive removal is completed.

Because the aggressive removal already ignores images and tasks this should
make the removal behave as expected though certainly leaves area for
improvement in future.

Fixes [YOCTO #1280].

(Bitbake rev: 1e1055262450de994202fc3e5943b8b19f628681)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27 16:54:03 +01:00
Jessica Zhang 49c01a89b5 ui/crumbs/tasklistmodel: fix loading a saved recipe
use the correct variable userpkgs instead of packages during reload saved
bb file that contains user customization.

Fixes [YOCTO #1289]

(Bitbake rev: 2650be190afc05f9472aca8b11af99205a342838)

Signed-off-by: Jessica Zhang <jessica.zhang@intel.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-26 20:15:49 +01:00
Joshua Lock 30a2ac4882 ui/crumbs/tasklistmodel: don't iterate whole model in find_alt_dependency()
The method needs to find an included item anyway so rather than iterating
the entire model and checking the included status of each entry iterate
over the contents gtk.TreeFilter.

(Bitbake rev: 79bdd501075ff5164a8ee673a6a2a0e402978ae5)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-26 20:15:48 +01:00
Joshua Lock b169dadb5f ui/crumbs/tasklistmodel: handle items added in by base image being removed
When building an image based on an existing image we need to correctly
handle removals from that images package set. Do so by testing if any of
the items brought in by the base image are removed and, if so, building
an image from scratch with all of the selected packages included.

Fixes [YOCTO #1232]

(Bitbake rev: 812ead4900714545850698d8ce29194f4ee8db0e)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-26 20:15:48 +01:00
Joshua Lock c884b52dd0 ui/hob: enable building an image with minimal contents
This patch enables a user to build a rootfs containing only the selected
packages without having to have first selected a 'Base image'.

Fixes [YOCTO #1239]

(Bitbake rev: 05c82da31a69c910e72b58b07afcd9fca8c55479)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-26 20:15:48 +01:00
Joshua Lock 20101e9544 ui/hob: Force the 'Base image combo' to be drawn correctly
As the combo is created before its backing model it's common for the combo to
be drawn at its minimum size and then grow the first time the user activates
it. This slight ugly patch forces the combo to be resized as soon as the
model is associated so that by the time the user interacts with the widget it
is less likely to change size.

(Bitbake rev: 65819447ccc96ae2af8d42cf3a31769ef3d2d26e)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-26 20:15:48 +01:00
Joshua Lock 9e6f220a54 ui/hob: change wording in build complete dialog
The 'View Log' button is potentially confusing to existing users of the
system who may be expecting to be shown the on disk logs of the build.
Instead use 'View Messages'.

Addresses [YOCTO #1222]

(Bitbake rev: 105bfe3562235fb586be4b4179bb34b2e94ef234)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-26 20:15:47 +01:00
Joshua Lock 40f0e6dbd4 ui/hob: don't offer to show built output if build fails
The link to open the deploy directory should only be shown if the build
completed succesfully.

(Bitbake rev: d947f9880c2205be66fbd61cf7d3728275979a56)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-26 20:15:47 +01:00
Joshua Lock 2d608f837d ui/hob: switch from buildFile to buildTargets for custom image builds
We need to use the buildTargets command to ensure dependencies, such as
native tools to build the rootfs, are correctly included. This patch
achieves this by modifying BBPATH and BBFILES to include matches for the
location of the generated recipe file and reparsing the metadata before
calling buildTargets.

Fixes [YOCTO #1228]

(Bitbake rev: 5840d59098141e773c12bea8ed8d9f4f1a706132)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-26 20:15:47 +01:00
Joshua Lock 6d76379af8 ui/crumbs/hobeventhandler: reparse files before running other commands
Integrate reparseFiles into the run_next_command() method rather than calling
reparseFiles on the server and immediately calling other methods.

(Bitbake rev: 20f7218992cfe18f1d3dcea53f2e5a7bf96346db)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-26 20:15:47 +01:00
Joshua Lock 5c3f42dbcf ui/hob: replace the ugly static command map
The command_map was never a good idea, what's implemented here is a
fraction less ugly but a significant factor more readable and therefore
easy to maintain.
The method implemented in this patch also has the advantage of not being
static meaning we can determine the desired runCommand arguments
dynamically at call time.

(Bitbake rev: 8b11c68ffcda355d0ba49cfc27790d245192ae24)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-26 20:15:47 +01:00
Joshua Lock 922eaae5d4 cooker: only append files once
A list can contain the same value twice, therefore only append to the
appendlist for a recipe if the append file is not already in the list.

(Bitbake rev: d11f9dd33cdcc97a4a937e8bf7e97558d813cadd)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-26 13:50:07 +01:00
Joshua Lock ba3aef9b06 command|cooker: Add reparseFiles command
Add command reparseFiles to reparse bb files in a running cooker instance.

Fixes [YOCTO #1249]

(Bitbake rev: de035ad99feb7644f99ad54804bf9f98cc776877)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-26 13:50:05 +01:00
Joshua Lock 0828e6c481 bitbake-layers: adapt to cooker change for saved environment
The Cooker requires a copy of the environment mapping, modify
bitbake-layers to take one and pass it to the cooker.

(Bitbake rev: f5653e557b68a27e99a2a6a5c5a31d0ba0b56bcb)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-26 13:46:32 +01:00
Joshua Lock 50016106ad data|cooker: use saved environment variables when calling inheritFromOS
Now that we have a pristine copy of the variables available at launch time
we can use them when looking to inherit the OS's environment.

(Bitbake rev: 21c21fcc5871e81d8d497b6baed605cdd74c4571)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-26 13:46:27 +01:00
Richard Purdie b163a0bca6 bitbake/utils: 'Fix' bb.utils.contains() behaviour
Currently bb.utils.contains(X, "A", true, false) will return true for substring matches,
e.g. if X = "ABC". This is not what most users expect from the function.

In the common OE use of this function there is the case of "touchscreen" and "screen" being
used as independent variables. Whilst it could be argued there isn't a problem in that
specific case (touchscreens are usually on screens), there is no substring usage of this
function is OE-Core so this patch changes the behaviour to match only full strings.

It also fixes a bug where duplicate entries would confuse multiple matches, e.g.
contains(X, ["A", "B"], ...) would match X = "A A" which is clearly wrong.

(Bitbake rev: 3d8647b68a8e66c7b240ed5fed7406e1b78fabf6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-26 12:05:22 +01:00
Richard Purdie 05ca275693 Update version to 1.13.3
(Bitbake rev: f0b5d16426b983a67c51c47f3542162108bd4156)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 14:36:00 +01:00
Joshua Lock e51d542e78 bitbake|cooker: save a copy of the environment when BitBake is started
Create a data store in the cooker containing the values of the environment
from when BitBake is launched such that child processes can replicate
(and/or use values from) the host environment, rather than the cleaned up
environment that the main BitBake process uses.

(Bitbake rev: 54c7206165c0e7cfe5f7b243c80461baf5e7dfb1)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 12:54:17 +01:00
Paul Eggleton 72e0b43e01 bitbake-layers: remove unneeded do_EOF
do_EOF is only needed when using the Python cmd class in line-oriented
mode - we are just sending single commands to it.

(Bitbake rev: 0cbf5dcaf9f67522bd58d868aa01f28e846dfc19)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 12:54:17 +01:00
Paul Eggleton d7e17ee92f bitbake-layers: add command help
If you run "bitbake-layers help commandname" it now provides some useful
help text.

(Bitbake rev: 1548edcd18a78bab74cde39167169f11ba3c4d58)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 12:54:17 +01:00
Paul Eggleton 27edc7c1a9 bitbake-layers: check for errors before parsing
Don't always parse on initialisation - instead check for errors and then
parse when we know we need to. Avoids keeping the user waiting.

(Bitbake rev: 86adaca6ce959ad5e908c394625bc9880f3c0216)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 12:54:17 +01:00
Paul Eggleton bc4aefff98 adjust comments/messages for default server change
Default server is process, adjust comments and messages accordingly.

(Bitbake rev: 8ba4d0e98401cdb808f727703913ad8ba87f8e71)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 12:54:16 +01:00
Paul Eggleton 638f8ca408 bitbake/cooker: show a warning when -b is specified
Too many people are using -b because they think it is the normal way of
specifying a target to be built, and then get confused when the build
fails due to a missing dependency; so show a warning about dependencies
not being handled when this option is used.

(Bitbake rev: c470f3f36aef24c46d9722593422286340be296b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 12:54:16 +01:00
Paul Eggleton 93cc53f842 add note to -b option indicating no dependency handling
The -b option doesn't handle dependencies so note this in the help.

(Bitbake rev: b133b2e2dd5bcde705397eb38fa20a5c4da6e3b3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 12:54:16 +01:00
Joshua Lock 9adf01d7be hob: rework image output type setting
The preferences UI to set the image output type only supported setting a
single value whereas it's common practice, particularly for those making
use of the ADT, to set multiple values. This is also the default in Poky.

This reworked preferences UI dynamically generates check boxes for each
available image type and sets an appropriate string representing all image
types when checkboxes are toggled.

Includes fixes for [YOCTO #1273]

(Bitbake rev: f7f68847dd165f2ad0f39011db4ebfef3ae73f42)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 12:54:16 +01:00
Joshua Lock 1f4e6d62f2 ui/crumbs/hobprefs: tweak the package format tooltip
(Bitbake rev: 5f774ef02743c09d181395f15fc9262e7a67ef5c)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 12:54:16 +01:00
Joshua Lock bb5c7d5b94 ui/crumbs/hobprefs: set higher arbitrary limit on threads & parallelism
We don't have a good handle on a sane cap value so just set it to an
arbitrary, but reasonably high, number. Once we have some more numbers on
values for number of threads and make parallelism we can integrate the
algorithm into the GUI.

Addresses [YOCTO #1266]

(Bitbake rev: 31274e78eab502f5eb9f6079897644b535d31dd1)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 12:54:15 +01:00
Joshua Lock 9cf5190679 hob: only add new layer's to the UI
If a user added the same layer more than once the underlying bblayers.conf
file would not have multiple entries but the UI would show an entry for
the layer for each time it was added. This patch changes the Configurator
to return None values if the layer wasn't added to bblayers.conf and the
LayerEditor to only update the UI if non-None values are returned.

Fixes [YOCTO #1275]

(Bitbake rev: 9c59baa4da3c863ebc412a56ffd8dbd7a8ffeb60)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 12:54:15 +01:00
Joshua Lock 52e0be44e0 ui/hob: if the user clicks Stop a second time only offer 'Force Stop'
Fixes [YOCTO #1264]

(Bitbake rev: 117fb14b93086660ce3f853964536920f916e060)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 12:54:15 +01:00
Joshua Lock 95d7895986 ui/hob: clear the search entry when resetting
When resetting and clearing all selections the searched for term is no
longer the selected row in the packages list, clear the search entry to
prevent cognitive disconnect.

(Bitbake rev: 4f86f5763ecf7f3a9673a9b18e96042e9387699b)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 12:54:15 +01:00
Joshua Lock bcd622906e ui/crumbs/tasklistmodel: don't show native and cross recipes
Addresses [YOCTO #1224]

(Bitbake rev: 80f8d796392cbf3c54149c06347c35f871fc2d79)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 12:54:14 +01:00
Joshua Lock bd1b9d6cd2 hob: refer to tasks as Package Collections
(Bitbake rev: 453d65df6675f38b57f92d8a1b65aa3f78abe4f0)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 12:54:14 +01:00
Paul Eggleton 3e0eb8a317 bitbake/cache: allow class names with arguments to be specified
This ensures we understand e.g. "virtual:multilib:lib64:pn" for multilib.

(Bitbake rev: 0b9dee799cfe2229ec62c257dda36bd6c15d34a9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 12:09:40 +01:00
Paul Eggleton 4a7ddff183 bitbake/ast: include class name when arguments given in variant
For multilib this produces variants of e.g. "multilib:lib64" instead of
just "lib64"; however we set BBEXTENDVARIANT to "lib64" and the latter
will be used when composing filenames for multilib.

(Bitbake rev: de7a2b91512bb3ab058f5eb5cd188acd2b8a2220)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-25 12:09:40 +01:00
Richard Purdie ac704918e4 bitbake/utils: Add contains helper function from lib.oe.utils
This function is needed by some of the early .conf setup we need
to improve the machine/tune files in Openembedded. We need to add
it here since the location in oe.utils can't be accessed until after
base.bbclass parses which is too late for our needs.

(Bitbake rev: abc67ed6921c98ed581f101ec1acc589fd9ce7e9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-22 12:12:35 +01:00
Liping Ke c97f136a94 Remove unused target tree data for Hob
Since Hob only needes package dependency information, we can
create a new version of package information retrieving methods,
remove task dependency information, so that we can greatly
reduce data loading time for Hob

(Bitbake rev: df55199209ef042e5b1ca04c4df75c7d639b51eb)

Signed-off-by: Liping Ke <liping.ke@intel.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-21 22:46:37 +01:00
Chris Larson 97fb1fea9b event: fix the event display order when exiting early
It was displaying the log messages in LIFO order, which isn't what we
expect to see. Thankfully this only occurred during an early abort (e.g.
config file parsing error), but those are the cases where it's very
important to see accurate messages, to diagnose.

(Bitbake rev: b838e0f3a1b481c295f66f5c9f561fa4d51de673)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-21 22:46:37 +01:00
Joshua Lock e2d2377257 ui/crumbs/tasklistmodel: ignore tasks and images when marking dependencies
When calculating what dependencies are affected by the removal of an item
we should ignore images and tasks as they are not constructs which make
sense in the GUI.
E.g: if we don't ignore tasks and remove opkg from an image based on
core-image-minimal the fact that opkg was brought in by task-core results
in task-core and all of the packages it brought in being removed and,
eventually, an empty image.

(Bitbake rev: 205b52bfc7f28af0c50fef1f741fae6af16fb0dc)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-21 22:08:11 +01:00
Joshua Lock 2bdd51854f ui/hob: don't crash if PARALLEL_MAKE doesn't include a space
Use string.strip() as a much safer method of turning the -j value into an int

Fixes [YOCTO #1244]

(Bitbake rev: 03baee9e0a7fc15fc6c226c07c0f50df136ac5b0)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-21 22:08:10 +01:00
Joshua Lock 4eeabbe7a0 ui/crumbs/configurator: write new lines after new entries
New entries written to a configuration file should be on separate lines,
ensure this is the case by appending a newline to each written variable.

(Bitbake rev: bac689fc34ea55c062d60ef249b79faa35f546a1)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-21 22:08:09 +01:00
Joshua Lock accd46c65f ui/hob: add more guidance to the stop dialog
This patch adds explanation of the different options when asking the user
to choose between Stop and Force Stop so they can make an informed choice.

Fixes [YOCTO #1223]

(Bitbake rev: afb87a809962b756f8282c9e9fdf9b15cdb9192b)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-21 22:08:09 +01:00
Joshua Lock a1e18b913f ui/crumbs/tasklistmodel: fix saving recipes
After switching to dynamically finding the relative path for the recipe
file it's no longer to append .bb when inserting the require line into the
saved recipe.

Fixes [YOCTO #1247]

(Bitbake rev: 2d05ce4f527daa905ed64485029ebeb2b349daa6)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-21 22:08:08 +01:00
Joshua Lock a78a99daff ui/crumbs/hobprefs: add missing import
glib.idle_add is used so the glib module must be imported

Fixes [YOCTO #1248]

(Bitbake rev: 0ab099f6ff4cc4e92484282d2dee442e55471e0c)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-21 22:08:07 +01:00
Richard Purdie 1df5ab5ee2 parse/ConfHandler: Fix multiline variable corruption
When parsing multiline variables in conf files, the last character can
be accidentally removed. s2 contains new data read from the file which
may or may not end with the continuation character. It makes sense to
let the next loop iteration strip this if needed.

We don't often use multiline expressions in .conf files which is why I'd
imagine we haven't noticed this before. Most variables are quoted and
its the closing quotation which often disappears.

(Bitbake rev: 09a9146262d58dfe4a2ea4270026b90ae33f6c91)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-21 11:09:47 +01:00
Christopher Larson 9070e745c0 cache: fix remnant broken 'info' reference from recent cache changes
(Bitbake rev: 807fb0b3bbad5163fdab24d379c2deba8f0b4f13)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-21 11:09:46 +01:00
Joshua Lock 0fc41bdf07 cooker: only return *Found events if something was actually found
The cooker methods which fire FooBarFound style events should only fire the
event when an item was actually found, rather than each time the method
is called.

Fixes [YOCTO #1219]

(Bitbake rev: 5c8eeefc79455f058dda8f04cf4c12dc5418e00f)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-14 15:12:52 +01:00
Joshua Lock 80441de058 ui/crumbs/tasklistmodel: fix automatic removal of orphaned items
The sweep_up() method intends to remove all packages with an empty brought in
by column, this patch changes the implementation to be more reliable.

Each time a removal is triggered we begin interating the contents model again
at the beginning, only once the contents model has been iterated from start
to finish without any removals can we be certain that there will be no more
orphaned items.

Fixes [YOCTO #1218]

(Bitbake rev: 4803c6d3d1db31105d98a7f71596875333db0dc5)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-13 12:29:17 +01:00
Joshua Lock e5c961714c ui/crumbs/tasklistmodel: update brought in by column when possible
When a package is orphaned we were not correctly updating the brought-in-by
column if a later package additon would have brought that package in as a
dependency. This patch ensures that orphan packages are correctly re-parented
when appropriate.

Partially addresses [YOCTO #1218]

(Bitbake rev: 570405f2f5a3976b308ef825ef477fb5cb6ee804)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-13 12:29:17 +01:00
Yu Ke bf8735f83b fetcher2: retry mirror if upstream checksum mismatch
This patch is for [YOCTO #1085] fix.

If the upstream fails a checksum, retry from the MIRROR before giving up.
This will add more robust fetching if an upstream serves a bad file or webpage.

fetching of distcc prior to the move from samba -> googlecode is a good example
of this.

(Bitbake rev: b631e922257de52bf2247c01152d9856c870e7d0)

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-13 12:13:10 +01:00
Lianhao Lu 4fadc30b92 bitbake cooker/ui: handle cmd line parsing result by individual UI.
Changed the return result of "getCmdLineAction" to a dictionary
{'action', 'msg'} to allow the individual UI decide how to handle the
cmd line parsing result.

(Bitbake rev: 521909d1350a415d19516aa1710041e30950c7cc)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-08 17:38:42 +01:00
Richard Purdie acc75635b8 fetch2/git: Tweak git fetcher to handling repo updates correctly
Currently the git fetcher can malfunction when branches change in remote
repositories since whilst the update code updates the "origin" remote,
this isn't linked to the local heads.

By passing the --mirror option to 'git clone' and 'git remote add',
linkage between the local heads and remote heads is created with a 1:1
mapping, hence all the appropriate heads are then updated correctly.

This fixes some issues which have been seen with the Yocto autobuilder
mirrors.

(Bitbake rev: 3725602ec53df116dc108b3197a426b86ca43d5f)

Signed-off-by: Richard Purdie <richard.purdie@linux-foundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-08 17:32:43 +01:00
Joshua Lock 20e8208839 lib/bb/ui/hob: don't error when dismissing save as dialog
If the user decides to cancel the save as dialog we should not try and save
regardless.

Fixes [YOCTO #1220]

(Bitbake rev: 3412fbd6a16980e0fba7742c32675eea9d77d6c0)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-08 17:32:42 +01:00
Joshua Lock 9c03094496 lib/bb/hob: fix changing base image
The path is not guaranteed to always point to the same value so do not rely
on it to change the image contents. Further, when changing the base image
we should maintain user selections.

Addresses [YOCTO #1225] and fixes [YOCTO #1226]

(Bitbake rev: 737d1bc819b192b4c2caa0482bddb6921b5aac93)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-08 17:32:41 +01:00
Joshua Lock b2124617ab ui/crumbs/tasklistmodel: fix reset method
The reset() method only touched the contents sub-model, which does not
include the selected image(s). This patch ensures that reset correctly unsets
any image selection when called.

Further we re-initialise the COL_IMG column when resetting packages.

(Bitbake rev: f3fbc97471961042e5eb8224dc07dcc04293efcf)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-08 17:32:40 +01:00
Richard Purdie 7e122178db bitbake/process.py: Ensure queued UI events are queued right before we add our own handler
(Bitbake rev: c7a9ef70ba91d47d53074e8d78cbc52f396144a7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-07 10:57:43 +01:00
Richard Purdie 159aee22dc cache.py: Ensure additional .bbappend files are accounted for
Currently if a user adds a new .bbappend file to the system, the cache still
thinks the cached data is valid. This code fixes that to ensure additions and
changed in append application order are accounted for.

[YOCTO #1091]

(Bitbake rev: 54fe91fe96aaae47c40077c5f441c79da71da777)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-07 10:57:42 +01:00
Richard Purdie d4132fa128 ui/depexp: If we're parsing zero files we need to ensure the cache progress bar gets hidden
(Bitbake rev: c8f46dfcc2f660a9cd52c64515624fad8d66461a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-05 23:45:10 +01:00
Joshua Lock 4cc291c007 hob: re-designed interaction and implementation
Highlights include:

* Atempted GNOME HIG compliance
* Simplified UI and interaction model
* Sorting and type to find in tree views
* Preferences dialog to modify local settings
* Dialog to add and remove layers
* Search in packages list
* Save/Load image recipes

The build model has been changed, hob will attempt to build all dependent
packages of an image and then use the buildFile server method to build the
created image.

(Bitbake rev: 48e64acaae4a741b9f5630f426fb4e6142755c2c)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-05 14:40:30 +01:00
Paul Eggleton 7fc9c3488f bitbake-layers: fix error on startup caused by recent cooker change
Fix bitbake-layers "TypeError: 'NoneType' object is not iterable" error on
startup. Commit f3be8e9a7d changed to expect
prefile and postfile to be populated and no longer expects file.

(Bitbake rev: 0f45fcab5c724aabb5b2933dfcdf88ebe256cba9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-05 14:39:44 +01:00
Paul Eggleton c4b4e474b6 bitbake-layers: fix sorting by package name for cooker change
Structure of cooker was changed since the patch for bitbake commit
edacf98cceb2fe1275042595d3fce6822fa411ca was created - cooker.pkg_pn now
has string keys, so sort it accordingly.

(Bitbake rev: 9c2a064ab7fd9b8bcca58dfeb1abfae2555f0088)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-05 14:39:43 +01:00
Dexuan Cui 7a2a24de09 bitbake/cooker, bitbake-layers: show the .bbappend files that matches no existing .bb recipe
This patch moves the logic of show_appends_with_no_recipes from bitbake-layers
into bitbake. By default, a fatal message is printed; we can also define a variable
BB_DANGLINGAPPENDS_WARNONLY to make the message only a warning(the variables
could be defined in conf/local.conf with a value "yes", "true" or "1").

(Bitbake rev: f5ba7c795df7cbd58124e35970ddc5bd84cbfb8e)

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-05 13:36:54 +01:00
Paul Eggleton deb14487d1 bitbake-layers: fix sorting of show_appends output
Sort packages alphabetically but ensure appends are left in their
original order (layer priority).

(Bitbake rev: edacf98cceb2fe1275042595d3fce6822fa411ca)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-05 13:36:53 +01:00
Paul Eggleton 1164b76983 bitbake-layers: add command to flatten layers into one
Takes the current layer configuration and builds a "flattened" directory
containing the contents of all layers, with any overlayed recipes removed
and bbappends appended to the corresponding recipes. Note that some manual
cleanup may still be necessary afterwards, in particular:

 * where non-recipe files (such as patches) are overwritten (the flatten
   command will show a warning for these)
 * where anything beyond the normal layer setup has been added to
   layer.conf (only the lowest priority layer's layer.conf is used)
 * Overridden/appended items from bbappends will need to be tidied up

(Bitbake rev: 296c83cc22ce281223fe91ef84bc89034cd141e7)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-05 13:36:52 +01:00
Paul Eggleton 3bf2d2103e bitbake/cooker: implement layer dependencies, make priority optional
Implement (optionally versioned) dependencies between layers, and if layer
priorities are not specified using BBFILE_PRIORITY_layername (now
optional) then work out the layer priority based on dependencies.

Define LAYERDEPENDS_layername in layer.conf to specify the dependencies
of a layer (list of layer names, split with spaces in the usual way);
LAYERVERSION_layername can be defined for each layer allowing specific
version dependencies to be specified via depname:version in the list of
dependencies. An error will be produced if any dependency is missing or
the version numbers do not match exactly (if specified).

Note: default priority if unspecified for a layer with no dependencies is
lowest defined priority + 1 (or 1 if no priorities are defined).

Addresses [YOCTO #790].

(Bitbake rev: 115b89fa279b64e79da0f72caf7b30965a83fab1)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-05 13:36:51 +01:00
Paul Eggleton 44db5d5d76 bitbake-layers: add show_overlayed action
Add a show_overlayed action to list overlayed recipes.

(Bitbake rev: f0c2175dc943160e45ebd72fc932dd16ee361bfb)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-05 13:36:50 +01:00
Paul Eggleton 07dbea44c7 bitbake: track 'overlayed' recipes
Recipes that have been 'overlayed' (where there is a recipe in another
layer where that layer has a higher priority) are now listed within
cooker.overlayedlist for use in bitbake-layers. This is a dict with
keys of the topmost (highest priority) recipe file.

(Bitbake rev: 370fc603d79f9c34cc23b4b520b685256c23df5d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-05 13:36:49 +01:00
Richard Purdie 81545301d7 bitbake: Switch to use process as the default server
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-05 11:40:23 +01:00
Richard Purdie 56e46f0bc4 bitbake/ast: Fix ??= vs. ?= handling
As the code stands, setting a variable with ??= could result in a ?=
variable not overriding it. This patch fixes the issue by allowing
the ast to make lookups that ignore any ??= set variables.

(Bitbake rev: 32fee2e650dfdd3aa9a7572dad1251e0c24ca34b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-05 11:39:05 +01:00
Richard Purdie ea518846b8 bitbake: Add missing bracket, somehow lost by sync scripts
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-01 17:44:12 +01:00
Joshua Lock f3be8e9a7d bitbake: add -R option for loading configuration files after bitbake.conf
Useful if you want to load a configuration file that sets values which may
also be set in bitbake.conf or one of the files it includes.

(Bitbake rev: a8246ae5400c23df0d3ee29c36f4d9f257d1e6d1)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-01 17:17:36 +01:00
Joshua Lock 22d8fb1fc3 cooker: switch to new universe target rather than world
When the caller doesn't specify a pkgs list we want to generate the tree of
all available packages. To do so use the new universe target list.

(Bitbake rev: 26b0c538ad4f677e0d45a66484c2dca073459282)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-01 17:17:36 +01:00
Joshua Lock 97e0beb393 cooker: remove code duplication in non trivial functions
The generateTargetsTreeData() and generateDepTreeData() functions perform
are essentially the same function only creating slightly different data
structures. Instead of duplicating non-trivial code drop
generateTargetsTreeData and instead have an optional boolean argument which
defaults to False for generateDepTreeData() which has it include the extra
fields required for the targets tree.

(Bitbake rev: 3e38ea4e5748473740821b6e10c8477c08ab45e2)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-01 17:17:36 +01:00
Joshua Lock 6c36f4a6aa cooker|command|event: add new command findFilesMatchingInDir
This command can be used to search each BBPATH for files in the passed
directory which have a filename matching the supplied pattern.

This is implemented for use from the GUI (to determine the available
PACKAGE_CLASSES) but has been written so as to be generically useful and
reusable.

(Bitbake rev: 2a599812a57cb0b964880a6a2b7548423497ea92)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-01 17:17:35 +01:00
Joshua Lock 9fe29fd7db command|cooker|event: add findConfigFilePath command
This takes the name of a .conf file and returns the full path to it

(Bitbake rev: 22c8600b885faf841795b872d82f68dfb644a26e)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-01 17:17:35 +01:00
Joshua Lock 6769269bea cooker: add generic method to locate configuration files
Convert _findLayerConf(self) to _findConfigFile(self, configfile) so that
the core functionality of the method can be used elsewhere.

(Bitbake rev: c515b76c3a27d57d5ae8dddf15cc836811b24ee1)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-01 17:17:35 +01:00
Joshua Lock a8afb3b353 command|cooker: allow generating targets tree for specified pkgs
Modify the generateTargetsTree command to allow a list of packages to be
supplied by the caller, in this case we will only generate a target tree
for user requested targets rather than building a tree for the world list.

(Bitbake rev: d4e4f2ecae96e074b2ab3bb9882037af2e385fdd)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-01 17:17:35 +01:00
Liping Ke cbd00b8927 bitbake: Make bitbake server type configurable.
Add -t options in bitbake for configuring server type.

(Bitbake rev: 5591329948648927154024bcb882c45766defac2)

Signed-off-by: Liping Ke <liping.ke@intel.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-01 17:17:35 +01:00
Lianhao Lu 94a57fd87e ui/hob: Fixed the "build again" hang.
Using gobject.threads_init() instead of gtk.gdk.threads_init(). These
two modes are conflict to each other. Using gobject.threads_init()
allows only the main thread to touch GUI(gtk) part.

(Bitbake rev: b9698d0e8d681f1fd6ab8d28530136b85411386f)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-01 17:17:35 +01:00
Richard Purdie f0c5451e59 Update version to 1.13.2
(Bitbake rev: 5d41720d1550c04aac76275614ca15110c1c7f52)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-28 15:28:16 +01:00
Richard Purdie a2b9ef9d78 bitbake/ast: Add optional argument for BBCLASSEXTEND
Add an optional argument to BBCLASSEXTEND entries which gets passed to
the extention class as BBEXTENDVARIANT. Also add BBEXTENDCURR whic
is set to the current extension class name.

This mode functions slightly differently to the previous BBCLASSEXTEND
code in that PN is not changed.

(Bitbake rev: 8d3c899e0a15840c54de26d2f1fc552430517778)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-28 15:27:43 +01:00
Richard Purdie 21c5985812 bitbake/ast: Call expandkeys after the RecipePreFinalise event
This means the event handler can change variables such as PN and those
changes will be reflected in the updated variable key names.

(Bitbake rev: 664b85742d1afc94b291a85fd245abebffacdf3d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-28 15:27:42 +01:00
Richard Purdie 1b5d7b59d3 bitbake/data_smart: Don't track overrides in deleted variable names
When we delete a variable we no longer expect it to override other
variables.

To do this we remove it from the list of active overrides at deletion
time. It turns out we already had to do this at override expansion time
so this cleans up the code to be more consistent as an added bonus.

(Bitbake rev: d924ff9ede57c3dea6e1c738ba3633f18d460b14)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-28 15:27:41 +01:00
Richard Purdie 5c5b0045e8 bitbake/data_smart: Don't export deleted/empty entries in the list of keys
If you d.delVar(), you expect the variable to be gone. Even empty
variables continue to exist in the datastore and are still user visible
unfortunately. The COW siutation means you can't just remove it
since it might unmask a variable from an inner copy.

This patch therefore stops empty variables from appearing in key lists
exposed to the external world making empty variables an internal
implementation detail only.

(Bitbake rev: 2b5548c591d4cfde9238d2cc0959c42cfc08f09c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-28 15:27:41 +01:00
Richard Purdie cc2a8ff522 bitbake/data_smart: Optimise the data store iterator
Since we're going to creat the seen set() anyway, we might as well use
it directly. If we don't do this, we see thousands of function calls
with associated overhead on profiles.

(Bitbake rev: 9d43e3279895639ee4899df635f2546c7ee13737)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-28 15:27:40 +01:00
Robert Yang 671e580111 bitbake: Add task specific stamp file support
This patch, based on proof of concept code from Richard adds code to
bitbake to allow individual tasks to optionally specify their stamp
file using the stamp-base flag. This takes the same form as the STAMP
variable but can be specified on a per task basis.

Code is also added to runqueue to ensure that if two tasks share the
same stamp file, only one will be executed at once.

A significant usecase for this code is to share source code (${S})
between recipes where separate build directories (${B}) are used.

(Bitbake rev: 41bef02bef8379590ba012319aebe05068a8081e)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-28 13:44:38 +01:00
Mark Hatle a1f79a7896 runqueue.py: Add umask task control
The umask for a task can now be set as:

task[umask] = 022
task[umask] = '022'

If specified as a text string, it must be octal.  (This is due to
recipe parsing where it's always set to a string.)

[RP tweaked to use None instead of -1]
(Bitbake rev: a5caaaaba8f0db1af5d8f2e610021d6d4b56894e)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-24 12:23:12 +01:00
Brandon Stafford 5fbb1b77d0 doc/usermanual.xml: Tweaks for the manual
This patch contains what I hope are non-controversial improvements to
the manual. Most of the changes are single characters, but the
line-by-line diff makes the patch look large.

(Bitbake rev: 5481cc90645e13c4e3cdea41e8e369528a0b1649)

Signed-off-by: Brandon Stafford <brandon@pingswept.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-22 16:57:31 +01:00
Scott Garman 48cd942be1 fetch2/git.py: improve error reporting when an invalid protocol is used
When an invalid 'protocol' parameter is used in a git SRC_URI,
the error reported was not helpful:

ERROR: Function 'Fetcher failure for URL: 'None'.
<environment dump>
fatal: Could not make temporary directory: No such file or directory

So instead check that ud.proto is set to something valid, and if not
raise a meaningful ParameterError which explains that the protocol
type is the source of the problem.

This fixes bug [YOCTO #1142]

(Bitbake rev: a2a29b72275ab03a263f4479a590b92111a0d6a8)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-22 16:27:30 +01:00
Richard Purdie 90dab9783d process.py: Fix issue where early errors weren't making it to the console
(Bitbake rev: d97f7d762e3d2f1b0da038d4d99f2531b2490670)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-16 22:14:01 +01:00
Scott Garman 62d538fbe6 make exception handling syntax consistent
Update exception handling syntax to use the modern style:
except ExcType as localvar

(Bitbake rev: dbf5f42b06bef81749b13aa99945cc1292a6676d)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-15 11:13:13 +01:00
Richard Purdie 039798a4d2 codeparser: When loading the cache, ignore ValueError
(Bitbake rev: 9bff182a4ba9571679985b45b309990a6eddad14)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-15 11:13:13 +01:00
Richard Purdie e5f3cc34df bitbake/fetch2: When replacing URLs in mirror handling mask out empty entries
The symptom of this problem is something like a cvs url which specifies
a username where the username is then passed through to something like
an http mirror.

This patch fixes things by ensuring empty entries are preserved in the
new URL.

(Bitbake rev: c1d978d7bd1ac8eb1e2d50029ab2384be9f72fb4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-13 15:10:07 +01:00
Richard Purdie ba5db2d81c bitbake/cooker: Fix -b option by ensuring the empty cache structure is present
(Bitbake rev: 1430a36e81737bd92245042710eb9d6ad8b6f1a7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-13 15:10:07 +01:00
Richard Purdie a831dc120f Update version to 1.13.1
(Bitbake rev: c3c2ad6f22e35b893a353d4c21d0e923e46ad07b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-09 22:44:55 +01:00
Richard Purdie b8321c5658 bitbake/event/ast: Add RecipePreFinalise event
One of the implications is we need to register the event handlers before
executing the anonymous python functions. I can't find any issue with making
that change in any existing metadata use cases.

(Bitbake rev: a981df3cc9bf410d24f39919959952bdc6c76d03)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-09 22:43:46 +01:00
Richard Purdie af93b8937e bitbake/parse/ast: We always need to finalize the default data since otherwise overrides to BBCLASSEXTEND may not be applied
(Bitbake rev: f22ac9149cc9ab96510bb377deb82cd9bceb95c1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-09 22:43:45 +01:00
Richard Purdie eda23733f0 bitbake/data_smart: Change overrides behaviour to remove expanded variables from the datastore
Currently if you do:

OVERRIDES = "z"
DEPENDS_prepend = "a "
DEPENDS = "b"
DEPENDS_z = "c"

d.update_data()
d.getVar("DEPENDS")

gives "a c"

d.update_data()
d.getVar("DEPENDS")

then gives "c"

This patch changes the behaviour such that at the time bitbake expands the DEPENDS_z
override, it removes "DEPENDS_z" from the data store. In the above example this would
mean that it wouldn't matter how often you call d.update_data(), you'd always get
"a c" back.

See the bitbake-devel mailing list for further discussion and analysis of the
potential impact of this change.

(Bitbake rev: 899d45b90061eb3cf3e71029072eee42cd80930c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-09 22:43:44 +01:00
Scott Garman 73871c2712 cache.py: fix bitbake -s command
This uses the correct index of self.pn when setting up cachedata's
pkg_pn, fixing the output of bitbake -s.

This fixes bug [YOCTO #1149].

(Bitbake rev: d000493c09ac5c1dcbab22d3a91296a9cb194ac0)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-09 22:18:50 +01:00
Paul Eggleton dc15ddd161 bitbake-layers: handle skipped recipes
Report bbappends correctly for skipped recipes instead of reporting the
bbappends as not having any matching recipe.

(From Poky rev: 39d72ecf6bc1da85aefb11e6481719185f0cb953)

(Bitbake rev: a71183762e5d7d9f8153832efb9595e3a21d62f1)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-09 18:12:51 +01:00
Paul Eggleton 81e2f52fb8 track skipped packages
Add skiplist to cooker that allows access to the list of packages skipped
via SkipPackage (this includes COMPATIBLE_MACHINE, INCOMPATIBLE_LICENSE,
etc.) This can be used to enhance error reporting.

(From Poky rev: 6c12b7b1099c77b87d4431d55e949cf7c5f52ded)

(Bitbake rev: 7d2363f35350be27a33f568c23eb07fcd3d27e53)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-09 18:12:51 +01:00
Richard Purdie e55dc39c37 Drop psyco support
At best it gave 1-2% improvement now, its 32 bit x86 only and isn't
supported after python 2.6.

PyPy is probably a better option now.

(Bitbake rev: 3c3bd0c2fa80d747f25401c17b785c7c2f3787ca)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-09 15:48:23 +01:00
Richard Purdie c7f76a1bc9 bitbake/data/runqueue: Sync up with upstream to clean up environment variable handling
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:28 +01:00
Richard Purdie bdab8e9354 bitbake/build.py: Drop exec_shell environment as its now unneeded
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:28 +01:00
Richard Purdie fe967227dd runqueue.py: Wrap parsing with exception trapping
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:28 +01:00
Chris Larson 95f02a2ab1 Shift traceback pre-formatting into LogHandler
It's cleaner to leave it behaving as usual, passing the exception data in the
exc_info attribute of the LogRecord where it normally lies, and then let
LogHandler make it pickleable so it can be sent to the UI.

(Bitbake rev: 3539c9474a0b53f57e614544c70a7197ecdfb130)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:27 +01:00
Richard Purdie 355338c40c bitbake/cooker.py: Misc sync with upstream
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:27 +01:00
Chris Larson 9f33dde6e7 cooker: use BBHandler.inherit for INHERIT
Ideally we'd avoid direct BBHandler usage, but honestly, to say the whole
bb.parse abstraction is incredibly leaky is an understatement.  If we try to
make handle() not reparse classes, things get ugly fairly quickly, as
inherit() calls handle() itself after adding the class to the inherit cache.

This change fixes it so we no longer risk reparsing a class if:

- it's listed in INHERIT multiple times
- it's listed in INHERIT and is 'inherit'ed from a class in INHERIT

(Bitbake rev: 057c3cddeb72584c6c3908bd702288cece9b66ea)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:26 +01:00
Chris Larson 88f4ba28bc cooker: simplify self.configuration.data vs data usage
(Bitbake rev: 87112adee4e8add0a97ff8be8311d9afe202412d)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:26 +01:00
Chris Larson 87dfc1466d cooker: don't choke if we have nothing to parse
If all our recipes were cached, there's no reason to fire off any parsing
progress events at all.

(Bitbake rev: e9e174e5781fc3de4dfd60d01228048a06a62b16)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:26 +01:00
Chris Larson 0f74a38ffd bb.exceptions: don't choke on frames without arguments
(Bitbake rev: c9bb37e588ee7ee95eca798b0eae57bad68e8caf)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:25 +01:00
Chris Larson 3fd34462ed cooker: handle ExpansionError the same way we do ParseError
(Bitbake rev: 12aef37618bc77fb5ef085d24ad85471fb85c111)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:25 +01:00
Chris Larson 96e2ee1d73 Shift exception formatting into the UI
Now we use bb.exceptions to pass pickleable traceback entries to the UI, and
the UI is free to do whatever it wants to do with this information. By
default, the log formatter for the UIs formats it with bb.exceptions.  This
also means that all exceptions should now show 3 lines of context and limit to
5 entries.

(Bitbake rev: ee48d628ee038bd72e1cd94aa75f5ccbacbcee4c)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:25 +01:00
Chris Larson a3efbb96f2 cooker: don't show a traceback for ParseError
(Bitbake rev: cae6bf031dc83ba0439d07584fdbbd4a962408a3)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:25 +01:00
Chris Larson e121054740 cooker: don't show a useless traceback for SyntaxError
Note: we rely on the fact that better_compile has already output information
about the exception, so don't do it ourselves.

(Bitbake rev: caf21e9fbf3c526c1d7c555d8c76dca8710f9def)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:25 +01:00
Chris Larson 97504f2bc8 cooker: use logger.exception for config file parse errors
(Bitbake rev: 775590c154bc189df3f5704bddf9b684b734fde0)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:24 +01:00
Chris Larson 1749a73669 cooker: pass traceback back from parsing thread
Uses bb.exceptions to get a traceback back from the parsing thread to the main
thread, where it is then formatted.  Also enables 3 lines of context for the
formatted traceback, and limits the number of entries displayed to 5.

(Bitbake rev: 8c33f50eb68411c071c001331e0134aeb776953b)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:24 +01:00
Chris Larson 36d1dcef65 cooker: show a useful message for ParsingFailure
(Bitbake rev: a41c217c6e9195f8b9ea2de6e1d335b10b904558)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:24 +01:00
Chris Larson 2cf67a71e3 bb.exceptions: don't show a repr of 'self'
Rather than treating self like an ordinary argument, showing a repr of its
value in the function spec when formatting the traceback entry, now we show
the class name for the method as a part of the function name. Example:

Old: bar(self=<some repr of Fooclass>, f=5)
New: Fooclass.bar(f=5)

(Bitbake rev: dbf405f1f7fda41944093906c13044c6cf78f859)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:24 +01:00
Chris Larson 63d14f474d bb.exceptions: handle tb entries without context
(Bitbake rev: b010c4d37cfff5f74747d7da8cc1bf6719e29357)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:24 +01:00
Chris Larson 5b4b6bc7f7 bb.exceptions: add to_string convenience function
(Bitbake rev: 17a64df7e91438ee3fe1f7095c319f700a5372f1)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:23 +01:00
Chris Larson 22522d5f0d bb.exceptions: add code to create pickleable traceback entries
This lets you get as much useful information as possible from traceback
entries while staying pickleable.

In addition, it has improved traceback formatting.  It shows the values of the
arguments for the functions, lines of context from the file for the code, and
has an optional formatter to do things like syntax highlighting for the code
lines.

(Bitbake rev: ad8ad3fcae29eafbdc09286984495d693a4b73ef)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:23 +01:00
Chris Larson 83708e43c2 bb.namedtuple_with_abc: add useful util from activestate
(Bitbake rev: bf9391c60d8dd9eeaca87783cb874c56fa7a4e91)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:23 +01:00
Richard Purdie a702c3dbf5 bitbake-layers: Fixup after recent server changes
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:23 +01:00
Richard Purdie d276be69d2 bitbake/cooker.py: Fix debug message arguments
(From Poky rev: 06bb59d)

(Bitbake rev: b420e865f6dfb04b58c1dbc5f1b5332b137f49ff)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 20:38:23 +01:00
Richard Purdie ed44d29b90 bitbake/lib/bb/__init__.py: Sync with upstream bitbake
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 13:17:15 +01:00
Richard Purdie 6c286ed9c5 bitbake/bin/bitbake: Return an error if exceptions occur
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 13:12:49 +01:00
Richard Purdie 5ded108567 bitbake/server/xmlrpc: Fix typo
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 13:11:58 +01:00
Richard Purdie 83c3f872cb bitbake/server/process: Implement getEvent()
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 12:04:23 +01:00
Richard Purdie 658ba779ac bitbake/server/process: Update to new server API
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 11:38:47 +01:00
Richard Purdie 8aabfed148 bitbake: Add process server from upstream bitbake
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 11:38:43 +01:00
Richard Purdie b34d66225f bitbake none/xmlrpc servers: Only send pickled events to the xmlrpc server
Only the xmlrpc server needs pickled events. Use the function names
to signify this requirement.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 11:38:15 +01:00
Richard Purdie cd3c4292e7 bitbake: Cleanup bitbake server init process to be clearer to follow
Create a standard format server class instance with method calls
for each step in the server setup. There should be enough hooks
for each of the different server types.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 11:37:26 +01:00
Richard Purdie e386fe4542 bitbake: Sync up with upstream cosmetic changes for bin/bitbake
Sync cosmetic differences between bitbake in poky and bitbake upstream
in preparation for resolving the real code differences in the server
handling.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-08 11:36:30 +01:00
Liping Ke 5af197b55a cache: Implement multiple extra cache fields request support
This patch is to support extra cache. If user needs to request
extra cache fields besides CoreRecipeInfo fields, just add a new
XXXRecipeInfo class definition as Hob Does.
Currently supported Extra RecipeInfo name is an array. We can
support multiple extra cache fields at the same time besides
CoreRecipeInfo which is needed by all clients.

(Bitbake rev: 077657e50ad032c0fa876bf54e9802af2686e0fb)

Signed-off-by: Liping Ke <liping.ke@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-07 22:40:01 +01:00
Liping Ke b3c41b1f46 Introduce new param caches_array into Cache impl.
When using hob ui interface, we need extra cache fields.
We will save ui required extra cache fields into a separate
cache file. This patch introduce this caches_array parameter.
It will be used in the extra cache implementation (following patch).
Caches_array at least contains CoreRecipeInfo. If users need extra
cache fields support, such as 'hob', caches_array will contain
more relevant elements such as HobRecipeInfo.

(Bitbake rev: d50389ae692377c957afec7c846fc2ce2c070a09)

Signed-off-by: Liping Ke <liping.ke@intel.com>
2011-06-07 22:39:52 +01:00
Liping Ke 43eb7d9563 Introduce extra cache class for image creator
Extra RecipeInfo will be all defined in this file. Currently,
Only Hob (Image Creator) Requests some extra fields. So
HobRecipeInfo is defined. It's named HobRecipeInfo because it
is introduced by 'hob'. Users could also introduce other
RecipeInfo or simply use those already defined RecipeInfo.
In the following patch, this newly defined new extra RecipeInfo
will be dynamically loaded and used for loading/saving the extra
cache fields.

(Bitbake rev: 75d9add923560af9fdd772a363c68337d2c9a97d)

Signed-off-by: Liping Ke <liping.ke@intel.com>
2011-06-07 22:39:12 +01:00
Liping Ke 8df355140c cache.py: Refactory Current Cache implementation
This patch is for refactorying current cache implementation, the
main reason is for introducing extra cache fields requests for
image creator as well as other users. The refactory parts include:
Move cache data retrieve methods out of Cache Data Fields
Definition. Since this retrieve methods will be shared for
both CoreRecipeInfo as well as the new introduced extra RecipeInfo
in the following patches.

(Bitbake rev: f0f53506926a3f79181796dde177f11f0a396b75)

Signed-off-by: Liping Ke <liping.ke@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-07 22:38:32 +01:00
Chris Larson 911e8bb56a siggen: don't choke with traceback when data is None
Given we use bb.error, not bb.fatal, here, it seems this was intended to be
non-fatal, yet we'd end up trying to concatenate None. Fix this by setting an
empty task to the empty string, for the purposes of hashing. Also str() the
value we get from the datastore, just in case something other than a string
was stored there.

(Bitbake rev: ec8a5a495b72e061a1e8d7c7449afb26581872c0)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-07 22:29:25 +01:00
Chris Larson 3eed3aac4c parse: pass a useful (if mangled) key to bb.data.expand for :=
(Bitbake rev: 8e1be0ca414d9d26e013ae212abdd9c39fa8df26)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-07 22:29:25 +01:00
Chris Larson 6b5d323b6c event: don't catch systemexit from handler execution
This means that anyone firing an event can get a systemexit and result in
their process exiting, which isn't ideal, but behaves the way it used to (in
particular, ensures that a sanity check failure will halt the build). This
should be revisited in the future.

(Bitbake rev: d6a0ffdd583be3df734171d7e91d334f798a79ce)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-02 23:58:05 +01:00
Richard Purdie fdead2bfc0 data_smart: Adding overrides of zero length is pointless so lets not
(Bitbake rev: 67434496108efc3aba9cb1e3640bc712658b1408)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-01 14:08:40 +01:00
Paul Eggleton 58bdecbc43 bitbake: use layer priority when applying bbappends
If the priority of a layer has been specified with BBFILE_PRIORITY_ then
use that to sort the list of BBFILES entries, which will affect the order
in which .bbappend files are applied.

Fixes [YOCTO #1125]

(Bitbake rev: a8ab0af776ba20c83832215054180fbd15c274c0)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-01 14:08:32 +01:00
Richard Purdie dc65caa889 providers.py: Correct PREFERRED_VERSION handling
Overrides on the right are the highest priority and in this case, pn-PN
and PN should take priority over any other override so fix the code to
do this.

Also, since overrides will have been processed by bitbake, we shouldn't
then be specifically looking up PREFERRED_VERSION_${PN} but just using
PREFERRED_VERSION.

This patch corrects the behaviours to match what the code is expected
to do.

(Bitbake rev: 606f1acc6fb8ccec45d6a52ed6ae6dc128011402)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-01 14:08:25 +01:00
Richard Purdie 24f8f691cf bitbake/runqueue.py: Move BB_WORKERCONTEXT to a place where anonymous python can see it
Signed-off-by: Richard  Purdie <richard.purdie@linuxfoundation.org>
2011-05-31 09:01:59 +01:00
Darren Hart 183ef127f5 fetch2/git: ensure network check log matches actual command
The git command string logged via check_network_access() does not match
the actual command executed in a few places. Ensure that it does.

(Bitbake rev: 10f3ca52dc274cd8b240987cfd7cd003aeda7ab1)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 18:27:19 +01:00
Darren Hart 5a4b8cef20 fetch2/git: use logging.debug() and clarify messages
Replace a call to print() with logging.debug() and flesh out the
message to clarify the state being reported.

(Bitbake rev: 9a28f7744e2f4224e7c097b8c4c1d49731b9a47e)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 18:27:18 +01:00
Richard Purdie fd00566144 bitbake/codeparser: Improve cache handling
The current codeparser cache handling hurts performance badly even
over a couple of cores and certainly on many core systems, it can
spent huge amounts of time in the codeparser cache save functions.

This patch reworks the cache handling so that each parsing thread
saves out its own "differences" file compared to any existing core
cache and then the main bitbake thread picks these up and merges
things back together.

This was tested on systems with small and large numbers of cores
and was found to perform orders of magnitude better in all cases
despite the more complex code.

(Bitbake rev: 9f27563d66523f5af1028f173d53ee75e0877d46)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:51 +01:00
Richard Purdie c373727bd0 bitbake/runqueue.py: Ensure existing setscene stamp files are taken into account
JaMa reported issues where bitbake would rebuild things instead of using the
existing built tasks. This was tracked to a case where:

a) rm_work is uses
b) A depends on B
c) B has a version change (e.g. PR bump)

and A *and* B would then rebuild.

It turns out that rm_work was correctly turning stamp files into the correct
_setscene varients but bitbake was then ignoring them during setscene processing.
If the correct sstate checksumed files didn't exist, everything would seemingly
rebuild.

The fix is to check for existing *_setscene stamps and if present, honour them.
If "basichash" is enabled, the hash is included with the stamps so everything
should then function as intended.

(Bitbake rev: 0a4d857aabc86b973170ba9ce32b6b449a4e2165)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:51 +01:00
Richard Purdie 5573852a82 bitbake/utils.py: Add option to lockfiles to return immediately rather than wait
There are usecases where we don't want to block waiting for a lockfile
so enhance the lockfile handling functions to support this.

(Bitbake rev: 97e8adf03e5fab1fd40c3d53c48f7b333bc2e145)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:51 +01:00
Richard Purdie 00c71132d5 bitbake/cooker.py: Ensure BBFILES is processed in order
The files found by collect_bbfiles should be processed in order but due
to being processed using python's set(), the order was not being preserved.

Use a list instead as whilst the code is slightly more ugly, order
is preserved.

Addresses [YOCTO #1100]

Acked-by: Darren Hart <dvhart@linux.intel.com>
(Bitbake rev: c12dd868368bdc3a4f800e075a30c67edca28d47)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:50 +01:00
Richard Purdie 65b5553278 bitbake/cooker.py: Fix -b option regexp handling
bitbake -b core-image was showing no matches when it should list all targets
containing the fragment "core-image". This patch only calls os.path.abspath()
on things that look like paths and passed the path around more consistently to
various functions to get this use case working again.

(Bitbake rev: 6e9119c42d3f4cb3dab3d25856eee8b4bf4ad94f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:50 +01:00
Yu Ke a667251041 fetch2/git: enhance the unpack by using "git checkout"
current git fetcher unpack method only checkout index and working tree,
but did not did not update the git branch in ref/heads, so user may not
get right info in ${S} by using git.

this patch enhance the unpack by using git checkout to fix this issue.

Fix bug [YOCTO #1089]

(Bitbake rev: c0eb89054aef4957966f98b44e7f3cce14fb337a)

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:50 +01:00
Yu Ke 3466f2193a fetch2/git: add document for git fetcher supported options
(Bitbake rev: d424ecd751f80a7aecec26e1a0cbd2a1b38e076b)

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:50 +01:00
Yu Ke 086479f386 fetch2/git: unify the nocheckout option format
make the nocheckout option format to be: default is "0",
use nocheckou=1 to set this option

with this patch, the format will be consistant with other bitbake options
like rebaseable

(Bitbake rev: bd51659f5ee521cb8e6631d5f26792ab573e6b30)

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:50 +01:00
Yu Ke 8a12fad293 fetch2/git: change default protocol from rsync to git
(Bitbake rev: e912122706b402f99848d50f721f179491644d0e)

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:49 +01:00
Lianhao Lu ecdbd6ab03 Add PR service deamon to bitbake
Added the initial implementation of the server side PR service.

(Bitbake rev: 4d0e79e5591ff58ce35c7fb96f6e9217ddc27466)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-27 17:55:49 +01:00
Richard Purdie 42076dc9b6 cooker.py: Don't show spurious warnings for collections of .bbappend files
Seeing warnings like:

WARNING: No bb files matched BBFILE_PATTERN_yocto '^/xxx/meta-yocto/'

are not encouraging to users and we shouldn't show these if we found
.bbappend files (but no .bb files). This change stops these warnings
from appearing.

(Bitbake rev: 48899fe7b3791dd897968f44c317e98bad14e146)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-25 23:47:22 +01:00
Richard Purdie fe5f742865 build/siggen: Ensure a task signature file is generated for each task that is executed
Tracing down signature changes and dependencies is hard unless the complete task
chain can be evaultated. Since we have the data available at task exeuction
time, writing it to disk makes sense.

This change is suboptimal internal knowledge stamp_internal() has leaks into
make_stamp() and the concepts used by this code need revisiting but the change
brings enough usability benefit to warrant its inclusion despite that.

Addresses issue [YOCTO #1074]

(Bitbake rev: 139b8a625818225c358a1b8363518d7ed6913188)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-25 23:39:37 +01:00
Otavio Salvador 32a4e74627 codeparser.py: fix syntax error in exception handling
Commit 036cf3cd11b3a6836b77f5ffa760ceee6b71b1ef missed the needed
brackets to handle more then a type of exception.

(Bitbake rev: abecbb4c0af83c6b4ee248b0f03b779f84b13390)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-24 17:16:47 +01:00
Yu Ke df2a37abd0 git fetcher: add support for rebaseable git repo
Some upstream git repo may rebase in the future, which means current
revision may disappear from the upstream repo after the rebase.

current git fetcher can not handle this case, because the git mirror
tar ball is per repo, and may also change in the rebase and lost the
current revision info.

To fix this issue, this patch
- add rebaseable tag in the SRC_URI
- for rebaseable repo, make git mirror tar ball per revision, in this
  case, even upstream rebase, the git mirror still has the current
  revision info.
- for rebaseable repo, generate mirror tar ball by default, since the
  repo may change in the future.

(Bitbake rev: 92701d4c5372db48847c70da4ebd0736d79fd54b)

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-17 15:19:36 +01:00
Joshua Lock 5251d9d9a5 bitbake/ui: Fix Gtk+ GUI's after recent cache changes
(Bitbake rev: 2bc8f405ec552ae0f1a79790569b2d044a35d3ba)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-16 20:48:34 +01:00
Richard Purdie 477934e5be codeparser.py: Ignore incomplete cache files
(Bitbake rev: 036cf3cd11b3a6836b77f5ffa760ceee6b71b1ef)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-12 23:39:20 +01:00
Richard Purdie 506241c914 bitbake: Add missing file
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-07 08:49:28 +01:00
Chris Larson 0788081ac7 Enable some DeprecationWarnings
We'll be skipping the Pending Deprecation step given our release process.

(Bitbake rev: 67a55a6b45fec300bea42c18be41cf0a2f931072)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 18:24:13 +01:00
Richard Purdie 0cc52efc8c bitbake: Sync fetch back with upstream
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 18:18:59 +01:00
Christopher Larson d2c925f8a9 fetch.git: fix a remnant wrt persist + keyerror
(Bitbake rev: 7492233f5249d348024bc3daa113a96b765f94db)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 18:16:13 +01:00
Richard Purdie f1c0c97f4d bitbake/persist_data: Sync file with upstream bitbake
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 18:07:23 +01:00
Chris Larson 754d1c6983 persist_data: implement comparison, same as dict
(Bitbake rev: 1190406c526c7bb7cf415867be83e0403812a7dd)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 18:05:11 +01:00
Chris Larson 824acff967 persist_data: don't allow non-string keys/values
(Bitbake rev: 28958cd55e592853c68f5f2ba79381d1b8dcfb8f)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:50:29 +01:00
Chris Larson d43e7a91f2 persist_data: add has_key
(Bitbake rev: 7942833ca0685cf4f3b243dde6203499ef97420c)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:50:14 +01:00
Chris Larson 7fc020aa15 persist_data: raise KeyError on missing elements
(Bitbake rev: a4f62433845c29f98c6a9746d5d2847bf9506ea5)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:49:17 +01:00
Chris Larson fc801b9073 event: improve output for syntax errors in handlers
Note: this includes IndentationError, which is a subclass of SyntaxError.

(Bitbake rev: 156ea134e82d873ca4b5343261da2291a2b32ef6)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:48:34 +01:00
Chris Larson 37cb4cc02b event: improve output when eventhandler exec fails
- Name the event handler by its actual name, so the traceback shows it rather
  than 'tmpHandler'.
- Rather than immediately aborting when encountering an event handler error,
  display an error message and try to continue.
- Show a traceback for ordinary exceptions, skipping the first entry in the
  traceback, so it only shows the useful information.
- Show an error, but no traceback, for SystemExit with a code other than 0.
- For for SystemExit with a code of 0, simply continue silently.

(Bitbake rev: faf682dfc23b7ef2ece04f7d50f9741224bb3bb0)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:48:22 +01:00
Chris Larson 8cf28d706b event: register event handler functions, not code objects
(Bitbake rev: be647dac9d458ee4b289ff5f66ed95b311d398d8)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:47:55 +01:00
Chris Larson 2d73cd1d32 build: fix dir removal traceback
This one is to cover the case where the current directory vanishes out from
under us, so os.getcwd() raises an OSError.

(Bitbake rev: 7a29ab534388c0095f7f826b16c5cff343927d10)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:46:03 +01:00
Chris Larson 8b938dc82c build: in exec_func, mkdirhier ${T}
This should fix the -c clean traceback people are seeing.

(Bitbake rev: 416d24912fcef1d82ce2c02855accd86a29e76b2)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:42:54 +01:00
Chris Larson 88dbb0523c Initial work on getting bitbake working under pypy
- use os.chmod, not os.fchmod, as the latter is missing under pypy
- rearrange our imports a bit
- don't die if sqlite3 is missing shared cache support

(Bitbake rev: f229824dc9c453adf6067500e2bf6761536e4f2f)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:42:03 +01:00
Chris Larson 628bd54d93 cooker: fix -b with BBCLASSEXTEND
(Bitbake rev: 58bdaeb679d3c84cda827a33d09ce543547c45b4)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:37:39 +01:00
Bernhard Reutner-Fischer 607432947c bitbake manual: fix typo
"is used signify" -> "is used to signify"

(Bitbake rev: c3dd4fd5c9fe106f7fae8c088e75cfb70f20e107)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-06 15:34:18 +01:00
Richard Purdie 72875493b8 bitbake/codeparser: Correctly handle a missing/empty cache file
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-05 19:27:46 +01:00
Richard Purdie 001a555c2f bitbake/cache.py: Ensure skipped recipes make it into the cache to avoid reparsing
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-05 15:53:09 +01:00
Richard Purdie c8928e93dd bitbake/cooker/codeparser: Ensure the code parser cache is saved for each parsing process
Before this change, the codeparser cache was only being saved for the main
server process. This is suboptimal as it leaves code being re-evaluated at
task execution time and increases parse time.

We use the multiprocess Finalize() functionality to ensure each process
saves out its cache. We need to update the cache save function to be multiprocess
friendly with locking.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-05 15:52:53 +01:00
Richard Purdie 9211fd9c37 bitbake/ast.py: Only run finalise() for the specified variant
Allows the heavy finalise function to only be run for the case we're
interested in when running tasks, saving some processing time.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-05 15:52:36 +01:00
Richard Purdie 8b32d40896 bitbake/runqueue.py: Remove old log file handling remnants
These lines date from earlier code and are no longer required.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-05 15:52:24 +01:00
Yu Ke a2030c8d1a git fetcher: make tag back to work, fix Yocto bug 972
In current git fetcher, tag does not work due to commit http://git.pokylinux.org/cgit/cgit.cgi/poky/commit/?id=5920e85c561624e657c126df58f5c378a8950bbc. Tag is not in sha256 form, so it will be treated invalid, and silently replaced by latest revision.

To fix it, this patch treat tag name as branches name, thus it will be handled correctly later. Thanks Richard for reviewing and proposing the better approach.

Fix [YOCTO #972]

CC: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Yu Ke <ke.yu@intel.com>
2011-05-03 12:16:52 +01:00
Saul Wold 28e7041a9c universe target: add a new target to collect all recipe targets
This new universe target is not intended to be used for
compiling or building everything, it use is for sanity checking
and other tasks that need to find all targets. This does not
exclude any broken or virtual targets.

Signed-off-by: Saul Wold <sgw@linux.intel.com>
2011-05-03 12:10:53 +01:00
Richard Purdie c4371138f7 bitbake/fetch2: Fix the problems introduced by the git fetcher AUTOREV fix
The ordering constrains on the urldata_init functions are not straight
forward. To avoid further problems, create a helper function to setup
the source revisions which the init functions can all at the appropriate
point.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-20 02:13:26 +01:00
Richard Purdie 2d2d07275c bitbake/fetch2/git: Fix a bug where AUTOREV and the git fetcher interact badly
Fix a bug where ud.branches were being referenced before it was set by
the git fetcher when using AUTOREV. To do this some ordering needed
to be changed. This fixes errors like:

ERROR: Error parsing /recipes-kernel/linux/rt-tests_git.bb: Failure expanding variable
SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception
AttributeError: 'FetchData' object has no attribute 'branches'

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-19 23:48:41 +01:00
Darren Hart 2ee0be82d0 bitbake: correct typo in ??= documentation
??= is a lazy version of ?=

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-04-18 09:40:37 +01:00