bitbake.git
8 years agoUpdate version to 1.13.3 1.13.3
Richard Purdie [Mon, 25 Jul 2011 12:50:38 +0000 (13:50 +0100)]
Update version to 1.13.3

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake|cooker: save a copy of the environment when BitBake is started
Joshua Lock [Fri, 22 Jul 2011 17:21:00 +0000 (10:21 -0700)]
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.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake-layers: remove unneeded do_EOF
Paul Eggleton [Fri, 22 Jul 2011 17:18:50 +0000 (18:18 +0100)]
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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake-layers: add command help
Paul Eggleton [Fri, 22 Jul 2011 17:17:39 +0000 (18:17 +0100)]
bitbake-layers: add command help

If you run "bitbake-layers help commandname" it now provides some useful
help text.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake-layers: check for errors before parsing
Paul Eggleton [Fri, 22 Jul 2011 16:03:55 +0000 (17:03 +0100)]
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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoadjust comments/messages for default server change
Paul Eggleton [Fri, 22 Jul 2011 15:26:18 +0000 (16:26 +0100)]
adjust comments/messages for default server change

Default server is process, adjust comments and messages accordingly.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/cooker: show a warning when -b is specified
Paul Eggleton [Fri, 22 Jul 2011 15:38:50 +0000 (16:38 +0100)]
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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoadd note to -b option indicating no dependency handling
Paul Eggleton [Fri, 22 Jul 2011 15:22:54 +0000 (16:22 +0100)]
add note to -b option indicating no dependency handling

The -b option doesn't handle dependencies so note this in the help.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agohob: rework image output type setting
Joshua Lock [Sat, 23 Jul 2011 04:47:00 +0000 (21:47 -0700)]
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]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/hobprefs: tweak the package format tooltip
Joshua Lock [Sat, 23 Jul 2011 00:07:37 +0000 (17:07 -0700)]
ui/crumbs/hobprefs: tweak the package format tooltip

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/hobprefs: set higher arbitrary limit on threads & parallelism
Joshua Lock [Fri, 22 Jul 2011 18:40:15 +0000 (11:40 -0700)]
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]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agohob: only add new layer's to the UI
Joshua Lock [Fri, 22 Jul 2011 18:32:27 +0000 (11:32 -0700)]
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]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/hob: if the user clicks Stop a second time only offer 'Force Stop'
Joshua Lock [Tue, 19 Jul 2011 23:04:38 +0000 (16:04 -0700)]
ui/hob: if the user clicks Stop a second time only offer 'Force Stop'

Fixes [YOCTO #1264]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/hob: clear the search entry when resetting
Joshua Lock [Fri, 8 Jul 2011 18:55:59 +0000 (11:55 -0700)]
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.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/tasklistmodel: don't show native and cross recipes
Joshua Lock [Thu, 7 Jul 2011 22:06:05 +0000 (15:06 -0700)]
ui/crumbs/tasklistmodel: don't show native and cross recipes

Addresses [YOCTO #1224]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agohob: refer to tasks as Package Collections
Joshua Lock [Fri, 22 Jul 2011 17:36:11 +0000 (10:36 -0700)]
hob: refer to tasks as Package Collections

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agobitbake/cache: allow class names with arguments to be specified
Paul Eggleton [Fri, 22 Jul 2011 14:41:07 +0000 (15:41 +0100)]
bitbake/cache: allow class names with arguments to be specified

This ensures we understand e.g. "virtual:multilib:lib64:pn" for multilib.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/ast: include class name when arguments given in variant
Paul Eggleton [Fri, 22 Jul 2011 14:37:44 +0000 (15:37 +0100)]
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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/utils: Add contains helper function from lib.oe.utils
Richard Purdie [Mon, 11 Jul 2011 13:38:50 +0000 (14:38 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoRemove unused target tree data for Hob
Liping Ke [Thu, 21 Jul 2011 19:08:58 +0000 (12:08 -0700)]
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

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>
8 years agoMerge remote-tracking branch 'origin/master'
Richard Purdie [Thu, 21 Jul 2011 21:36:01 +0000 (22:36 +0100)]
Merge remote-tracking branch 'origin/master'

8 years agoevent: fix the event display order when exiting early
Chris Larson [Thu, 21 Jul 2011 20:23:19 +0000 (13:23 -0700)]
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.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agoui/crumbs/tasklistmodel: ignore tasks and images when marking dependencies
Joshua Lock [Wed, 20 Jul 2011 23:44:06 +0000 (16:44 -0700)]
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.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/hob: don't crash if PARALLEL_MAKE doesn't include a space
Joshua Lock [Tue, 19 Jul 2011 23:21:24 +0000 (16:21 -0700)]
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]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/configurator: write new lines after new entries
Joshua Lock [Mon, 18 Jul 2011 23:21:01 +0000 (16:21 -0700)]
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.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/hob: add more guidance to the stop dialog
Joshua Lock [Sat, 16 Jul 2011 01:06:41 +0000 (18:06 -0700)]
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]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/tasklistmodel: fix saving recipes
Joshua Lock [Fri, 15 Jul 2011 17:15:14 +0000 (10:15 -0700)]
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]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoui/crumbs/hobprefs: add missing import
Joshua Lock [Thu, 14 Jul 2011 01:19:35 +0000 (18:19 -0700)]
ui/crumbs/hobprefs: add missing import

glib.idle_add is used so the glib module must be imported

Fixes [YOCTO #1248]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoparse/ConfHandler: Fix multiline variable corruption
Richard Purdie [Wed, 20 Jul 2011 21:51:23 +0000 (22:51 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocache: fix remnant broken 'info' reference from recent cache changes
Christopher Larson [Tue, 19 Jul 2011 20:05:53 +0000 (13:05 -0700)]
cache: fix remnant broken 'info' reference from recent cache changes

Signed-off-by: Christopher Larson <kergoth@gmail.com>
8 years agocooker: only return *Found events if something was actually found
Joshua Lock [Wed, 13 Jul 2011 16:06:41 +0000 (09:06 -0700)]
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]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoui/crumbs/tasklistmodel: fix automatic removal of orphaned items
Joshua Lock [Tue, 12 Jul 2011 21:48:59 +0000 (14:48 -0700)]
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]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoui/crumbs/tasklistmodel: update brought in by column when possible
Joshua Lock [Tue, 12 Jul 2011 21:48:58 +0000 (14:48 -0700)]
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]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetcher2: retry mirror if upstream checksum mismatch
Yu Ke [Wed, 13 Jul 2011 09:08:39 +0000 (17:08 +0800)]
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.

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake cooker/ui: handle cmd line parsing result by individual UI.
Lianhao Lu [Tue, 14 Jun 2011 07:12:16 +0000 (15:12 +0800)]
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.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetch2/git: Tweak git fetcher to handling repo updates correctly
Richard Purdie [Thu, 7 Jul 2011 23:30:41 +0000 (00:30 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linux-foundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolib/bb/ui/hob: don't error when dismissing save as dialog
Joshua Lock [Thu, 7 Jul 2011 22:43:27 +0000 (15:43 -0700)]
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]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agolib/bb/hob: fix changing base image
Joshua Lock [Thu, 7 Jul 2011 22:43:26 +0000 (15:43 -0700)]
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]

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoui/crumbs/tasklistmodel: fix reset method
Joshua Lock [Thu, 7 Jul 2011 22:43:25 +0000 (15:43 -0700)]
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.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/process.py: Ensure queued UI events are queued right before we add our own...
Richard Purdie [Wed, 6 Jul 2011 17:02:00 +0000 (18:02 +0100)]
bitbake/process.py: Ensure queued UI events are queued right before we add our own handler

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocache.py: Ensure additional .bbappend files are accounted for
Richard Purdie [Wed, 6 Jul 2011 16:54:49 +0000 (17:54 +0100)]
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]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoui/depexp: If we're parsing zero files we need to ensure the cache progress bar gets...
Richard Purdie [Tue, 5 Jul 2011 15:31:22 +0000 (16:31 +0100)]
ui/depexp: If we're parsing zero files we need to ensure the cache progress bar gets hidden

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agohob: re-designed interaction and implementation
Joshua Lock [Fri, 1 Jul 2011 22:58:50 +0000 (15:58 -0700)]
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.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake-layers: fix error on startup caused by recent cooker change
Paul Eggleton [Tue, 5 Jul 2011 13:25:06 +0000 (14:25 +0100)]
bitbake-layers: fix error on startup caused by recent cooker change

Fix bitbake-layers "TypeError: 'NoneType' object is not iterable" error on
startup. Commit f3be8e9a7df13cc11ffc8fc667efaf2db96a7c38 changed to expect
prefile and postfile to be populated and no longer expects file.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake-layers: fix sorting by package name for cooker change
Paul Eggleton [Tue, 5 Jul 2011 13:25:05 +0000 (14:25 +0100)]
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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/cooker, bitbake-layers: show the .bbappend files that matches no existing...
Dexuan Cui [Sat, 2 Jul 2011 15:15:30 +0000 (23:15 +0800)]
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").

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake-layers: fix sorting of show_appends output
Paul Eggleton [Wed, 29 Jun 2011 18:37:41 +0000 (19:37 +0100)]
bitbake-layers: fix sorting of show_appends output

Sort packages alphabetically but ensure appends are left in their
original order (layer priority).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake-layers: add command to flatten layers into one
Paul Eggleton [Wed, 29 Jun 2011 18:37:40 +0000 (19:37 +0100)]
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

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/cooker: implement layer dependencies, make priority optional
Paul Eggleton [Wed, 29 Jun 2011 18:37:39 +0000 (19:37 +0100)]
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].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake-layers: add show_overlayed action
Paul Eggleton [Wed, 29 Jun 2011 18:37:38 +0000 (19:37 +0100)]
bitbake-layers: add show_overlayed action

Add a show_overlayed action to list overlayed recipes.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake: track 'overlayed' recipes
Paul Eggleton [Wed, 29 Jun 2011 18:37:37 +0000 (19:37 +0100)]
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.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/ast: Fix ??= vs. ?= handling
Richard Purdie [Tue, 5 Jul 2011 10:02:04 +0000 (11:02 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake: add -R option for loading configuration files after bitbake.conf
Joshua Lock [Fri, 1 Jul 2011 06:02:53 +0000 (23:02 -0700)]
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.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocooker: switch to new universe target rather than world
Joshua Lock [Fri, 1 Jul 2011 06:02:54 +0000 (23:02 -0700)]
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.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocooker: remove code duplication in non trivial functions
Joshua Lock [Fri, 1 Jul 2011 06:02:55 +0000 (23:02 -0700)]
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.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocooker|command|event: add new command findFilesMatchingInDir
Joshua Lock [Fri, 1 Jul 2011 06:02:52 +0000 (23:02 -0700)]
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.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocommand|cooker|event: add findConfigFilePath command
Joshua Lock [Fri, 1 Jul 2011 06:02:51 +0000 (23:02 -0700)]
command|cooker|event: add findConfigFilePath command

This takes the name of a .conf file and returns the full path to it

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocooker: add generic method to locate configuration files
Joshua Lock [Fri, 1 Jul 2011 06:02:50 +0000 (23:02 -0700)]
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.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocommand|cooker: allow generating targets tree for specified pkgs
Joshua Lock [Fri, 1 Jul 2011 06:02:49 +0000 (23:02 -0700)]
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.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake: Make bitbake server type configurable.
Liping Ke [Fri, 1 Jul 2011 06:02:48 +0000 (23:02 -0700)]
bitbake: Make bitbake server type configurable.

Add -t options in bitbake for configuring server type.

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>
8 years agoui/hob: Fixed the "build again" hang.
Lianhao Lu [Fri, 1 Jul 2011 06:02:47 +0000 (23:02 -0700)]
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.

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>
8 years agoUpdate version to 1.13.2 1.13.2
Richard Purdie [Tue, 28 Jun 2011 14:26:29 +0000 (15:26 +0100)]
Update version to 1.13.2

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/ast: Add optional argument for BBCLASSEXTEND
Richard Purdie [Tue, 7 Jun 2011 09:16:52 +0000 (17:16 +0800)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/ast: Call expandkeys after the RecipePreFinalise event
Richard Purdie [Fri, 17 Jun 2011 16:37:20 +0000 (17:37 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/data_smart: Don't track overrides in deleted variable names
Richard Purdie [Fri, 17 Jun 2011 16:34:52 +0000 (17:34 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/data_smart: Don't export deleted/empty entries in the list of keys
Richard Purdie [Fri, 17 Jun 2011 16:32:21 +0000 (17:32 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/data_smart: Optimise the data store iterator
Richard Purdie [Fri, 10 Jun 2011 16:23:33 +0000 (17:23 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake: Add task specific stamp file support
Robert Yang [Tue, 28 Jun 2011 09:05:19 +0000 (17:05 +0800)]
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.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoRevert the unintentionally pushed msg.py change
Chris Larson [Mon, 27 Jun 2011 14:08:06 +0000 (07:08 -0700)]
Revert the unintentionally pushed msg.py change

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agomsg: fix domain enum use
Christopher Larson [Mon, 27 Jun 2011 00:29:18 +0000 (17:29 -0700)]
msg: fix domain enum use

Signed-off-by: Christopher Larson <kergoth@gmail.com>
8 years agomsg: use a simpler enumeration for the domains
Christopher Larson [Mon, 27 Jun 2011 00:17:00 +0000 (17:17 -0700)]
msg: use a simpler enumeration for the domains

Rather than using a namedtuple, which is rather ugly in this particular use
case, we simply subclass a 'set' and provide a __getattr__. There is also
another benefit beyond readability -- when debugging, as in tracebacks, you see
a string for the value rather than a number as is the case with a namedtuple.

Signed-off-by: Christopher Larson <kergoth@gmail.com>
8 years agorunqueue.py: Add umask task control
Mark Hatle [Wed, 22 Jun 2011 15:10:58 +0000 (15:10 +0000)]
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]
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agodoc/usermanual.xml: Tweaks for the manual
Brandon Stafford [Wed, 22 Jun 2011 15:30:26 +0000 (16:30 +0100)]
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.

Signed-off-by: Brandon Stafford <brandon@pingswept.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetch2/git.py: improve error reporting when an invalid protocol is used
Scott Garman [Sun, 19 Jun 2011 23:15:25 +0000 (16:15 -0700)]
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]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoprocess.py: Fix issue where early errors weren't making it to the console
Richard Purdie [Wed, 15 Jun 2011 15:01:37 +0000 (16:01 +0100)]
process.py: Fix issue where early errors weren't making it to the console

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agomake exception handling syntax consistent
Scott Garman [Tue, 14 Jun 2011 23:44:58 +0000 (16:44 -0700)]
make exception handling syntax consistent

Update exception handling syntax to use the modern style:
except ExcType as localvar

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocodeparser: When loading the cache, ignore ValueError
Richard Purdie [Wed, 15 Jun 2011 09:27:09 +0000 (10:27 +0100)]
codeparser: When loading the cache, ignore ValueError

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/fetch2: When replacing URLs in mirror handling mask out empty entries
Richard Purdie [Fri, 10 Jun 2011 08:13:24 +0000 (09:13 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/cooker: Fix -b option by ensuring the empty cache structure is present
Richard Purdie [Fri, 10 Jun 2011 16:25:04 +0000 (17:25 +0100)]
bitbake/cooker: Fix -b option by ensuring the empty cache structure is present

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoUpdate version to 1.13.1 1.13.1
Richard Purdie [Thu, 9 Jun 2011 21:41:27 +0000 (22:41 +0100)]
Update version to 1.13.1

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/event/ast: Add RecipePreFinalise event
Richard Purdie [Thu, 9 Jun 2011 16:30:17 +0000 (17:30 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/parse/ast: We always need to finalize the default data since otherwise overri...
Richard Purdie [Wed, 1 Jun 2011 11:22:17 +0000 (12:22 +0100)]
bitbake/parse/ast: We always need to finalize the default data since otherwise overrides to BBCLASSEXTEND may not be applied

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/data_smart: Change overrides behaviour to remove expanded variables from...
Richard Purdie [Tue, 31 May 2011 22:52:50 +0000 (23:52 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocache.py: fix bitbake -s command
Scott Garman [Thu, 9 Jun 2011 18:13:06 +0000 (11:13 -0700)]
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].

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake-layers: handle skipped recipes
Paul Eggleton [Wed, 1 Jun 2011 16:48:32 +0000 (17:48 +0100)]
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)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agotrack skipped packages
Paul Eggleton [Wed, 1 Jun 2011 14:37:07 +0000 (15:37 +0100)]
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)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agopersist_data: Add back code to retry in the case of locked database errors
Richard Purdie [Wed, 8 Jun 2011 19:25:12 +0000 (20:25 +0100)]
persist_data: Add back code to retry in the case of locked database errors

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoDrop psyco support
Richard Purdie [Thu, 9 Jun 2011 09:33:56 +0000 (10:33 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocooker.py: Drop duplicate parseCommandLine call
Richard Purdie [Wed, 8 Jun 2011 18:27:56 +0000 (19:27 +0100)]
cooker.py: Drop duplicate parseCommandLine call

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobuild/runqueue: Pass quieterrors flag around to supress errors at task execution...
Richard Purdie [Wed, 8 Jun 2011 19:21:42 +0000 (20:21 +0100)]
build/runqueue: Pass quieterrors flag around to supress errors at task execution time

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake-layers: Add comment header
Richard Purdie [Wed, 8 Jun 2011 16:26:10 +0000 (17:26 +0100)]
bitbake-layers: Add comment header

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqueue.py: Export further hash information into the task environment
Richard Purdie [Wed, 8 Jun 2011 18:49:05 +0000 (19:49 +0100)]
runqueue.py: Export further hash information into the task environment

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agodata.py: Ensure vardeps flags get expanded
Richard Purdie [Wed, 8 Jun 2011 19:23:11 +0000 (20:23 +0100)]
data.py: Ensure vardeps flags get expanded

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoknotty: If any error messages are seen, set our exit code accordingly
Richard Purdie [Wed, 8 Jun 2011 12:34:03 +0000 (13:34 +0100)]
knotty: If any error messages are seen, set our exit code accordingly

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/hob: fix cancel button
Joshua Lock [Wed, 9 Mar 2011 05:39:38 +0000 (21:39 -0800)]
bitbake/hob: fix cancel button

An accidental logic inversion (aka thinko) had the cancel button only
cancel a build when the user didn't confirm the cancellation (i.e. clicked
no)...

(From Poky rev: ff3e326269d27662c830b04e05b571d257b89346)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/goggle: closing the progress dialog kills the UI
Joshua Lock [Mon, 10 Jan 2011 14:37:03 +0000 (14:37 +0000)]
bitbake/goggle: closing the progress dialog kills the UI

It's unlikely that someone wants to close the progress dialog
yet leave the UI (and BitBake process) running, so hook up
the progress dialogs delete-event to exit gtk.

(From Poky rev: c9bb30b232396bbdd3c97c1059e972d6a4abf637)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/depexp: closing progress dialog kills gui
Joshua Lock [Mon, 10 Jan 2011 14:45:07 +0000 (14:45 +0000)]
bitbake/depexp: closing progress dialog kills gui

It seems safe to assume a user hitting the close button
on the dialog wants to kill the whole UI.

(From Poky rev: e21150f2b18ff4ac85e64ed8814f0268007830c0)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/hob: only show one progress dialog when changing machine
Joshua Lock [Fri, 25 Feb 2011 18:57:10 +0000 (18:57 +0000)]
bitbake/hob: only show one progress dialog when changing machine

Remove a spurious signal emission which resulted in two progress dialogs
being shown after changing the machine.

(From Poky rev: 7738e86e8b4881056bd44d0f767d17b36159a7bb)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agohob/crumbs/hobeventhandler: Remove server specific implementation details missed...
Richard Purdie [Wed, 8 Jun 2011 12:30:53 +0000 (13:30 +0100)]
hob/crumbs/hobeventhandler: Remove server specific implementation details missed in the precious cleanup

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoxmlrpc/event: Add ability to send pickled events to UI if requested
Richard Purdie [Wed, 8 Jun 2011 12:13:55 +0000 (13:13 +0100)]
xmlrpc/event: Add ability to send pickled events to UI if requested

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