bitbake.git
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>
8 years agobitbake/server: Add the none server back for now
Richard Purdie [Wed, 8 Jun 2011 12:11:11 +0000 (13:11 +0100)]
bitbake/server: Add the none server back for now

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/server: Move server specific code into the server backend and create a server API
Richard Purdie [Wed, 8 Jun 2011 12:08:52 +0000 (13:08 +0100)]
bitbake/server: Move server specific code into the server backend and create a server API

Move the server implementation specific code into the server backend where
it belongs and replace this with a set of object method calls which
establish the server, detach it and then connect to it using appropriate
IPC.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/server/process: Move implementation knowledge of event queue into the server
Richard Purdie [Wed, 8 Jun 2011 12:01:34 +0000 (13:01 +0100)]
bitbake/server/process: Move implementation knowledge of event queue into the server

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/cooker.py: Fix debug message arguments
Richard Purdie [Wed, 8 Jun 2011 11:56:21 +0000 (12:56 +0100)]
bitbake/cooker.py: Fix debug message arguments

(From Poky rev: 06bb59d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/cooker: Ensure delays are accurately transfered to the idle loops from runqueue
Richard Purdie [Tue, 15 Feb 2011 23:18:39 +0000 (23:18 +0000)]
bitbake/cooker: Ensure delays are accurately transfered to the idle loops from runqueue

(From Poky rev: 579ecccc2244da43b9bc03fb09bb71d8a0219a8b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/runqueue: When we have successfully collected a pid value return True to...
Richard Purdie [Tue, 15 Feb 2011 23:20:20 +0000 (23:20 +0000)]
bitbake/runqueue: When we have successfully collected a pid value return True to ensure we don't sleep in the main loop

(From Poky rev: 5a178b547bbf6d99c42cba6821b3f559e585a079)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/runqueue: When we successfully fork off a task and there are more processes...
Richard Purdie [Tue, 15 Feb 2011 23:20:54 +0000 (23:20 +0000)]
bitbake/runqueue: When we successfully fork off a task and there are more processes we can start do so immediately

(From Poky rev: 974ea1a190167dcfd831ba1fc5f733e0dc9a6fda)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/runqueue: show correct task name for setscene task failure
Paul Eggleton [Mon, 28 Feb 2011 14:28:25 +0000 (14:28 +0000)]
bitbake/runqueue: show correct task name for setscene task failure

If a setscene task failed previously it was showing an incorrect task
name in the error line. This patch ensures we show the correct name, also
including the "_setscene" suffix.

(From Poky rev: 9d9c68e3536387150e3ce7261f4770576e724dd9)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/runqueue: fix clash when setscene & real tasks done in same build
Paul Eggleton [Fri, 25 Mar 2011 13:22:01 +0000 (13:22 +0000)]
bitbake/runqueue: fix clash when setscene & real tasks done in same build

If a build causes a real task to be run when the setscene task has already
run then it was possible for dependent packages to be rebuilding at the same
time as a rebuild of the packages they depended on, resulting in failures
when files were missing. This change looks in the setscene covered list and
removes anything where a dependency of the real task is going to be run (e.g.
do_install is going to be run even though the setscene equivalent of
do_populate_sysroot has already been run).

As an additional safeguard we also delete the stamp file for the setscene
task under these circumstances.

Fixes [YOCTO #792]

(From Poky rev: b4268c08c350a7928a0b1a041b04ffe5a44e77b4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocooker/process.py: Move profiling code to a place it can be reused by different serve...
Richard Purdie [Wed, 8 Jun 2011 10:44:50 +0000 (11:44 +0100)]
cooker/process.py: Move profiling code to a place it can be reused by different server mechanisms

The cooker profiling code isn't server specific so move it to a place
where different server backends can use it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocache: Implement multiple extra cache fields request support
Liping Ke [Fri, 3 Jun 2011 00:22:40 +0000 (08:22 +0800)]
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.

Signed-off-by: Liping Ke <liping.ke@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocache: Introduce new param caches_array into Cache impl.
Liping Ke [Fri, 3 Jun 2011 00:21:44 +0000 (08:21 +0800)]
cache: 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.

Signed-off-by: Liping Ke <liping.ke@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocache: Introduce extra cache class for image creator
Liping Ke [Fri, 3 Jun 2011 00:20:15 +0000 (08:20 +0800)]
cache: 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.

Signed-off-by: Liping Ke <liping.ke@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocache.py: Refactory Current Cache implementation
Liping Ke [Fri, 3 Jun 2011 00:17:23 +0000 (08:17 +0800)]
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.

Signed-off-by: Liping Ke <liping.ke@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocache.py: Sync what amounts to whitespace with bitbake in poky, pending merge of...
Richard Purdie [Tue, 7 Jun 2011 21:32:59 +0000 (22:32 +0100)]
cache.py: Sync what amounts to whitespace with bitbake in poky, pending merge of cache patches

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/cooker: don't error in prepareTreeData for unbuildable targets
Joshua Lock [Sat, 5 Mar 2011 17:13:32 +0000 (17:13 +0000)]
bitbake/cooker: don't error in prepareTreeData for unbuildable targets

Set abort to False in prepareTreeData so that unbuildable targets do not
raise an exception.

(From Poky rev: 3c113f355bce012d55dac873189a410657016a62)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agouniverse target: add a new target to collect all recipe targets
Saul Wold [Thu, 21 Apr 2011 18:44:45 +0000 (11:44 -0700)]
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.

(From Poky rev: 28e7041a9c110be2ac5dea1eb1f55ca8f056111e)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobb.exceptions: don't choke on frames without arguments
Chris Larson [Fri, 3 Jun 2011 18:29:44 +0000 (14:29 -0400)]
bb.exceptions: don't choke on frames without arguments

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agosiggen: don't choke with traceback when data is None
Chris Larson [Thu, 2 Jun 2011 21:46:13 +0000 (14:46 -0700)]
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.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agoparse: pass a useful (if mangled) key to bb.data.expand for :=
Chris Larson [Thu, 2 Jun 2011 21:45:37 +0000 (14:45 -0700)]
parse: pass a useful (if mangled) key to bb.data.expand for :=

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agocooker: handle ExpansionError the same way we do ParseError
Chris Larson [Thu, 2 Jun 2011 21:45:13 +0000 (14:45 -0700)]
cooker: handle ExpansionError the same way we do ParseError

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agoevent: don't catch systemexit from handler execution
Chris Larson [Thu, 2 Jun 2011 21:32:17 +0000 (14:32 -0700)]
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.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agoMerge remote branch 'github/exceptions'
Chris Larson [Thu, 2 Jun 2011 21:20:26 +0000 (14:20 -0700)]
Merge remote branch 'github/exceptions'

* github/exceptions:
  Shift exception formatting into the UI
  cooker: don't show a traceback for ParseError
  cooker: don't show a useless traceback for SyntaxError
  cooker: use logger.exception for config file parse errors
  cooker: pass traceback back from parsing thread
  cooker: show a useful message for ParsingFailure
  bb.exceptions: don't show a repr of 'self'
  codeparser.py: fix syntax error in exception handling
  codeparser.py: Ignore incomplete cache files
  bb.exceptions: handle tb entries without context
  bb.exceptions: add to_string convenience function
  bb.exceptions: add code to create pickleable traceback entries
  bb.namedtuple_with_abc: add useful util from activestate

8 years agodata_smart: Adding overrides of zero length is pointless so lets not
Richard Purdie [Wed, 1 Jun 2011 13:01:32 +0000 (14:01 +0100)]
data_smart: Adding overrides of zero length is pointless so lets not

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake: use layer priority when applying bbappends
Paul Eggleton [Wed, 1 Jun 2011 10:09:34 +0000 (11:09 +0100)]
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]

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoproviders.py: Correct PREFERRED_VERSION handling
Richard Purdie [Tue, 31 May 2011 22:02:01 +0000 (23:02 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoserver: add updated/fixed xmlrpc server from Poky
Joshua Lock [Fri, 27 May 2011 20:03:55 +0000 (13:03 -0700)]
server: add updated/fixed xmlrpc server from Poky

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agouievent: fix queueing of events for xmlrpc before UI has loaded
Joshua Lock [Fri, 27 May 2011 20:04:44 +0000 (13:04 -0700)]
uievent: fix queueing of events for xmlrpc before UI has loaded

The change to Queue up events before the UI is spawned broke the xmlrpc
server because the uievent implementation of BBUIEventQueue expects pickled
strings for its queue_event() method.
This is because the RPC exposed event.send() method must accept pickled
strings, but for xmlrpc event.send() is just mapped to queue_event(). Work
around this by adding a send_event method which unpickles strings and hands
them off to queue_event() which can then be used for the remapping.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agofetch2/git: ensure network check log matches actual command
Darren Hart [Fri, 20 May 2011 23:06:12 +0000 (16:06 -0700)]
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.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetch2/git: use logging.debug() and clarify messages
Darren Hart [Fri, 20 May 2011 23:06:14 +0000 (16:06 -0700)]
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.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/codeparser: Improve cache handling
Richard Purdie [Fri, 27 May 2011 15:14:48 +0000 (16:14 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agorunqueue.py: Set BB_WORKERCONTEXT in task execution context
Richard Purdie [Fri, 27 May 2011 16:16:11 +0000 (17:16 +0100)]
runqueue.py: Set BB_WORKERCONTEXT in task execution context

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/runqueue.py: Ensure existing setscene stamp files are taken into account
Richard Purdie [Fri, 27 May 2011 14:03:51 +0000 (15:03 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/utils.py: Add option to lockfiles to return immediately rather than wait
Richard Purdie [Fri, 27 May 2011 15:13:27 +0000 (16:13 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/cooker.py: Ensure BBFILES is processed in order
Richard Purdie [Fri, 27 May 2011 14:13:54 +0000 (15:13 +0100)]
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/cooker.py: Fix -b option regexp handling
Richard Purdie [Fri, 27 May 2011 14:11:49 +0000 (15:11 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetch2/git: enhance the unpack by using "git checkout"
Yu Ke [Thu, 26 May 2011 07:37:56 +0000 (15:37 +0800)]
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]

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetch2/git: add document for git fetcher supported options
Yu Ke [Tue, 24 May 2011 06:22:52 +0000 (14:22 +0800)]
fetch2/git: add document for git fetcher supported options

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetch2/git: unify the nocheckout option format
Yu Ke [Thu, 26 May 2011 07:29:37 +0000 (15:29 +0800)]
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

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agofetch2/git: change default protocol from rsync to git
Yu Ke [Tue, 24 May 2011 07:41:14 +0000 (15:41 +0800)]
fetch2/git: change default protocol from rsync to git

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agoAdd PR service deamon to bitbake
Lianhao Lu [Fri, 27 May 2011 06:31:45 +0000 (14:31 +0800)]
Add PR service deamon to bitbake

Added the initial implementation of the server side PR service.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocooker.py: Don't show spurious warnings for collections of .bbappend files
Richard Purdie [Wed, 25 May 2011 22:45:31 +0000 (23:45 +0100)]
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.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobuild/siggen: Ensure a task signature file is generated for each task that is executed
Richard Purdie [Wed, 25 May 2011 22:19:41 +0000 (23:19 +0100)]
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]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agogit fetcher: add support for rebaseable git repo
Yu Ke [Sun, 15 May 2011 14:33:30 +0000 (22:33 +0800)]
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.

Signed-off-by: Yu Ke <ke.yu@intel.com>
8 years agobitbake/ui: Fix Gtk+ GUI's after recent cache changes
Joshua Lock [Wed, 11 May 2011 00:07:56 +0000 (17:07 -0700)]
bitbake/ui: Fix Gtk+ GUI's after recent cache changes

Signed-off-by: Joshua Lock <josh@linux.intel.com>
8 years agoShift exception formatting into the UI
Chris Larson [Fri, 6 May 2011 00:43:38 +0000 (17:43 -0700)]
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.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agocooker: don't show a traceback for ParseError
Chris Larson [Fri, 6 May 2011 14:18:44 +0000 (07:18 -0700)]
cooker: don't show a traceback for ParseError

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agocooker: don't show a useless traceback for SyntaxError
Chris Larson [Fri, 6 May 2011 14:15:34 +0000 (07:15 -0700)]
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.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agocooker: use logger.exception for config file parse errors
Chris Larson [Fri, 6 May 2011 02:21:12 +0000 (19:21 -0700)]
cooker: use logger.exception for config file parse errors

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agocooker: pass traceback back from parsing thread
Chris Larson [Thu, 5 May 2011 23:55:33 +0000 (16:55 -0700)]
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.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agocooker: show a useful message for ParsingFailure
Chris Larson [Thu, 5 May 2011 23:50:34 +0000 (16:50 -0700)]
cooker: show a useful message for ParsingFailure

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agobb.exceptions: don't show a repr of 'self'
Chris Larson [Sat, 14 May 2011 00:35:37 +0000 (17:35 -0700)]
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)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agocodeparser.py: fix syntax error in exception handling
Otavio Salvador [Fri, 13 May 2011 16:46:32 +0000 (16:46 +0000)]
codeparser.py: fix syntax error in exception handling

Commit 036cf3cd11b3a6836b77f5ffa760ceee6b71b1ef missed the needed
brackets to handle more then a type of exception.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
8 years agocodeparser.py: Ignore incomplete cache files
Richard Purdie [Thu, 12 May 2011 22:35:53 +0000 (23:35 +0100)]
codeparser.py: Ignore incomplete cache files

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobb.exceptions: handle tb entries without context
Chris Larson [Fri, 6 May 2011 02:07:21 +0000 (19:07 -0700)]
bb.exceptions: handle tb entries without context

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agobb.exceptions: add to_string convenience function
Chris Larson [Fri, 6 May 2011 02:06:35 +0000 (19:06 -0700)]
bb.exceptions: add to_string convenience function

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agobb.exceptions: add code to create pickleable traceback entries
Chris Larson [Thu, 5 May 2011 23:53:52 +0000 (16:53 -0700)]
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.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agobb.namedtuple_with_abc: add useful util from activestate
Chris Larson [Thu, 5 May 2011 23:53:44 +0000 (16:53 -0700)]
bb.namedtuple_with_abc: add useful util from activestate

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agocodeparser.py: fix syntax error in exception handling
Otavio Salvador [Fri, 13 May 2011 16:46:32 +0000 (16:46 +0000)]
codeparser.py: fix syntax error in exception handling

Commit 036cf3cd11b3a6836b77f5ffa760ceee6b71b1ef missed the needed
brackets to handle more then a type of exception.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
8 years agocodeparser.py: Ignore incomplete cache files
Richard Purdie [Thu, 12 May 2011 22:35:53 +0000 (23:35 +0100)]
codeparser.py: Ignore incomplete cache files

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/utils.py: Only try and add read access to a file if we don't have it
Richard Purdie [Fri, 25 Feb 2011 17:22:00 +0000 (17:22 +0000)]
bitbake/utils.py: Only try and add read access to a file if we don't have it

A file we're copying might be on a readonly filesystem so if we can already read
it, don't try and add read permission.

Fixes BUGID #771 in Yocto.

(From Poky rev: 9166b9e32fd6f618f9597b07d88cef09a88916a1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/fetch2/local: Fix inverted update required logic
Richard Purdie [Wed, 9 Mar 2011 19:01:35 +0000 (11:01 -0800)]
bitbake/fetch2/local: Fix inverted update required logic

(From Poky rev: 4f28cd2d1854df8e6f56544fe509fb2e3ddce9aa)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/fetch2: Allow local file:// urls to be found on mirrors
Richard Purdie [Tue, 8 Mar 2011 19:23:34 +0000 (11:23 -0800)]
bitbake/fetch2: Allow local file:// urls to be found on mirrors

With the current implementation, file:// urls as used by sstate don't access the
mirror code, breaking sstate mirror support. This change enables the usual
mirror handling. To do this, we remove the localfile special case, using the basename
paramemter instead. We also ensure the downloads directory is checked for files.

The drawback of this change is that file urls containing "*" globing require special
casing in the core.

(From Poky rev: a778fb311540580476976e43f9c0576284f8dc38)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/fetch2: Fix the problems introduced by the git fetcher AUTOREV fix
Richard Purdie [Wed, 20 Apr 2011 01:13:23 +0000 (02:13 +0100)]
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.

(From Poky rev: c4371138f7444ecaa1fdd2b1ee4949fbc819f886)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/fetch2/git: Fix a bug where AUTOREV and the git fetcher interact badly
Richard Purdie [Tue, 19 Apr 2011 22:31:09 +0000 (23:31 +0100)]
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'

(From Poky rev: 2d2d07275c8a2d652a221c1cd74d28c2f6f226d5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobuild.py: Fix ordering bug introduced in 7a29ab534388c0095f7f826b16c5cff343927d10
Richard Purdie [Fri, 6 May 2011 14:46:35 +0000 (15:46 +0100)]
build.py: Fix ordering bug introduced in 7a29ab534388c0095f7f826b16c5cff343927d10

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake docs: use dblatex to build the pdf bitbake manual
Darren Hart [Wed, 9 Mar 2011 20:55:20 +0000 (12:55 -0800)]
bitbake docs: use dblatex to build the pdf bitbake manual

Fix [BUGID #593]

The current manual build fails for printing formats which use latex as an
intermediate format. This bug has been reported in multiple locations and I
haven't found a solution posted to any of them.

Using --with-dblatex uses dblatex to make the conversion and successfully
generates the pdf. It adds a dependency on dblatex and its dependencies.

(From Poky rev: b26640f30a4c80fcedda0d19bcf96ed412062a33)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agocorrect typo in ??= documentation
Darren Hart [Wed, 13 Apr 2011 00:11:52 +0000 (17:11 -0700)]
correct typo in ??= documentation

??= is a lazy version of ?=

(From Poky rev: 2ee0be82d065aeee716a9c0289bf111ea121e6dc)

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agogit fetcher: make tag back to work, fix Yocto bug 972
Yu Ke [Mon, 18 Apr 2011 05:53:53 +0000 (13:53 +0800)]
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>
(From Poky rev: a2030c8d1a58c79428cba80158982aea4d2d9f6d)

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/codeparser: Correctly handle a missing/empty cache file
Richard Purdie [Thu, 5 May 2011 18:27:46 +0000 (19:27 +0100)]
bitbake/codeparser: Correctly handle a missing/empty cache file

(From Poky rev: 72875493b8bbb5d6793380ee71c6bca4f438ca04)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/cache.py: Ensure skipped recipes make it into the cache to avoid reparsing
Richard Purdie [Sun, 10 Apr 2011 17:55:48 +0000 (10:55 -0700)]
bitbake/cache.py: Ensure skipped recipes make it into the cache to avoid reparsing

(From Poky rev: 001a555c2f755d4f8a69b113656d9307ca7ee597)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/cooker/codeparser: Ensure the code parser cache is saved for each parsing...
Richard Purdie [Sun, 10 Apr 2011 17:52:29 +0000 (10:52 -0700)]
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.

(From Poky rev: c8928e93dd8a08d6768623f6491c9ba31d0aa06f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agobitbake/ast.py: Only run finalise() for the specified variant
Richard Purdie [Sun, 10 Apr 2011 17:50:16 +0000 (10:50 -0700)]
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.

(From Poky rev: 9211fd9c375489c73924fd43f1f8a0da2c4290bb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8 years agomanual: fix typo
Bernhard Reutner-Fischer [Mon, 2 May 2011 09:45:56 +0000 (11:45 +0200)]
manual: fix typo

"is used signify" -> "is used to signify"

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
8 years agobuild: run fakeroot if FAKEROOT is set
Chris Larson [Fri, 8 Apr 2011 14:10:40 +0000 (07:10 -0700)]
build: run fakeroot if FAKEROOT is set

FAKEROOT contains the fakeroot command to be run.  This should not be set for
those using pseudo + FAKEROOTENV, but should be set for people like upstream
OE, and its value should be 'fakeroot' for them, for compatibility with the
old mechanisms.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agofetch.git: fix a remnant wrt persist + keyerror
Christopher Larson [Thu, 7 Apr 2011 03:34:53 +0000 (20:34 -0700)]
fetch.git: fix a remnant wrt persist + keyerror

Signed-off-by: Christopher Larson <kergoth@gmail.com>
8 years agopersist_data: implement comparison, same as dict
Chris Larson [Mon, 4 Apr 2011 16:36:45 +0000 (09:36 -0700)]
persist_data: implement comparison, same as dict

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agopersist_data: make SQLTable a context manager
Chris Larson [Thu, 10 Feb 2011 00:57:03 +0000 (17:57 -0700)]
persist_data: make SQLTable a context manager

This can be used for more control over the underlying transactions.  Unlike
the context manager of, say, a file object, we can still use the object even
after the end of a given with block, as the context manager exit only ensures
we've committed to the database, not that we have closed the database.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
8 years agopersist_data: don't allow non-string keys/values
Chris Larson [Mon, 4 Apr 2011 16:37:07 +0000 (09:37 -0700)]
persist_data: don't allow non-string keys/values

Signed-off-by: Chris Larson <chris_larson@mentor.com>