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>
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.
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)...
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.
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>
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.
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.
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>
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>
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>
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>
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.
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>
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>
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
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>
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>
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.
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
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.
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.
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'
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.
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.
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.
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>
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>