Chris Larson [Thu, 11 Nov 2010 15:43:48 +0000 (08:43 -0700)]
Don't ship our own copy of PLY, require it
PLY is publically available, so there's no point in shipping ours. We still
retain a local copy, however, so we don't lose the ability to run bitbake in
place in the source tree.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Peter Chubb [Thu, 3 Sep 2009 17:31:40 +0000 (17:31 +0000)]
Allow mercurial fetcher to follow tip
There are occasions when developing when I want a package always to
grab the latest copy of a package. Witht eh CVS fetcher you can do
this by setting the `date' tag to `now'. This patch adds similar
functionality to the mercurial fetcher: if the revision to fetch is
`tip' then always grab from the server, and don't use the cached
tarball.
Oh, and I fixed a typo in the Class comment.
Signed-off-by: Peter Chubb <peter.chubb@nicta.com.au> Signed-off-by: Chris Larson <chris_larson@mentor.com>
Chris Larson [Thu, 4 Nov 2010 15:47:11 +0000 (08:47 -0700)]
Fix GraphViz .dot output for rdepends and rrecs
Use bb.utils.explode_deps to break up the rdepends and rrecommends strings.
This fixes the same issue which was fixed by a number of patches floating
around, but uses explode_deps rather than regular expressions.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Eric BENARD [Mon, 6 Sep 2010 08:51:52 +0000 (08:51 +0000)]
bitbake: lib/bb/fetch/hg: fix fetching from a mercurial repository
* without this fix, we get :
updating working directory
74 files updated, 0 files merged, 0 files removed, 0 files unresolved
abort: There is no Mercurial repository here (.hg not found)!
Joshua Lock [Tue, 5 Oct 2010 11:44:08 +0000 (12:44 +0100)]
fetch: if mirror fetching fails, ensure exception is raised
We catch any exception raised by the fetchers go() method and attempt to work
around it by trying any (post) mirrors which are configured. However, should
the mirrors fail the exception is lost and the fetch is assumed to have
completed successfully.
Instead, save the exception and if the local file does not exist after trying
the mirrors re-raise the exception.
Fixes poky [BUGID #362]
Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Chris Larson <chris_larson@mentor.com>
Chris Larson [Tue, 28 Sep 2010 15:24:55 +0000 (08:24 -0700)]
Queue up events before the UI is spawned
- Queue up any events fired to the UI before the UI exists
- At exit, check if UIs exist, and if not, flush the queue of LogRecords to
the console directly.
- When establishing a connection from the UI to the server, flush the queue of
events to the queue in the server connection, so the UI will receive them
when it begins its event loop.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Chris Larson [Fri, 10 Sep 2010 18:34:39 +0000 (11:34 -0700)]
Fix bitbake -k issue introduced by build exception cleanup
A SystemExit from a python function wasn't being raised as a FuncFailed, which
resulted in it not being caught by the exception handlers in the runqueue for
the worker process, which resulted in a SystemExit exit, rather than os._exit,
which causes all manner of problems when used in a forked process. This fixes
it by ensuring we raise a FuncFailed when seeing exceptions which aren't
instances of Exception.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Chris Larson [Fri, 10 Sep 2010 18:14:54 +0000 (11:14 -0700)]
Fix exit code display for task failure
Per the python documentation, os.waitpid returns the exitcode shifted up by 8
bits, and we weren't compensating, resulting in a display of 'failed with 256'
when a worker process exits with a code of 1.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Chris Larson [Fri, 10 Sep 2010 01:03:40 +0000 (18:03 -0700)]
Simplify build exception handling
- Drop EventException
- Use FuncFailed as the primary function failure exception, using TaskFailed
for the event (leaving it up to the process running exec_{func,task} to
display the more detailed information available in the exception).
- Switch InvalidTask to an exception rather than an event, as that's a
critical issue.
- Reduce the number of messages shown to the user when a task fails -- they
don't need to be told it fails 12 times. Work remains in this area though.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Chris Larson [Sat, 4 Sep 2010 01:58:22 +0000 (18:58 -0700)]
Merge branch 'logging'
* logging:
Drop 'fn' arguments to bb.msg functions
Add pending deprecation warnings to the bb.msg functions
Switch bitbake internals to use logging directly rather than bb.msg
Use logging in the knotty ui, and pass the log record across directly
Use the python logging module under the hood for bb.msg
Chris Larson [Thu, 10 Jun 2010 17:35:31 +0000 (10:35 -0700)]
Switch bitbake internals to use logging directly rather than bb.msg
We use a custom Logger subclass for our loggers
This logger provides:
- 'debug' method which accepts a debug level
- 'plain' method which bypasses log formatting
- 'verbose' method which is more detail than info, but less than debug
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Chris Larson [Thu, 10 Jun 2010 15:05:52 +0000 (08:05 -0700)]
Use logging in the knotty ui, and pass the log record across directly
This kills firing of Msg* events in favor of just passing along LogRecord
objects. These objects hold more than just level and message, but can also
have exception information, so the UI can decide what to do with that.
As an aside, when using the 'none' server, this results in the log messages in
the server being displayed directly via the logging module and the UI's
handler, rather than going through the server's event queue. As a result of
doing it this way, we have to override the event handlers of the base logger
when spawning a worker process, to ensure they log via events rather than
directly.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Chris Larson [Wed, 11 Aug 2010 20:52:30 +0000 (13:52 -0700)]
Merge branch 'sched'
* sched:
Split out 'find next buildable task' into a separate generator function
Let the RunQueueScheduler control the number of active tasks
Add the ability to use runqueue schedulers from the metadata
Chris Larson [Thu, 22 Jul 2010 18:27:10 +0000 (11:27 -0700)]
Add the ability to use runqueue schedulers from the metadata
If you create a runqueue scheduler class in a python module, available in the
usual python search path, you can now make it available to bitbake via the
BB_SCHEDULERS variable, and the user can then select it as they select any
other scheduler.
Example usage:
In a test.py I placed appropriately:
import bb.runqueue
class TestScheduler(bb.runqueue.RunQueueScheduler):
name = "myscheduler"
In local.conf, to make it available and select it:
Chris Larson [Thu, 5 Aug 2010 04:58:51 +0000 (21:58 -0700)]
When shutting down, send SIGTERM, not SIGINT
SIGINT should be from the user, not a script. It also doesn't work as
reliably to shut down processes, as it's not always interpreted as a
termination request. In addition, it causes KeyboardInterrupt exceptions in
the worker processes, which can interfere with our exception handling.
utils: Fix number of arguments to bb.msg functions
the 'fn' argument of them is not used, should be removed anytime:
sed -i -e
'/^def.*fn/s/,[[:space:]]*fn[[:space:]]*=[[:space:]]*None[[:space:]]*)/)/g'
lib/bb/msg.py
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Chris Larson [Thu, 22 Jul 2010 17:54:58 +0000 (10:54 -0700)]
Let the runqueue find the user selected scheduler dynamically
Searches the module (bb.runqueue) for any new style classes which are
instances of RunQueueScheduler, and uses the one whose 'name' attribute
matches the value of BB_SCHEDULER.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Jeff Dike [Tue, 29 Jun 2010 12:33:24 +0000 (13:33 +0100)]
create cooker object after cleaning the environment
Previously, the cooker object was created before the environment was
cleaned, saving everything that was in the environment and dumping
into the run scripts.
The patch ensures that the cooker gets a cleaned environment when it's
created.
Jeff Dike [Tue, 29 Jun 2010 12:32:04 +0000 (13:32 +0100)]
Move the logger initialization from cooker to utils
In order to move the environment cleaning, which wants to log a
message, before cooker creation, the logging facility initialization
needs to happen earlier. So, it is now in init_logger in utils.py and
called from bitbake before the creation of the data object.
It also seems more correct to initialize a global facility like this
from a more global context than the creation of an object, of which
there could theoretically be many.
Nitin A Kamble [Fri, 4 Jun 2010 04:50:02 +0000 (21:50 -0700)]
bitbake decodeurl: fix the file:// url handling
Without this patch decoding a url of this kind file://dir/filename gives
path=/filename host=dir.
With the patch it decodes as path=/dir/filename host=""
Probably nobody stumbled on this issue yet because nobody used
file:// urls with directory names in the path.
Chris Larson [Thu, 10 Jun 2010 16:14:39 +0000 (09:14 -0700)]
Switch a fatal usage to SystemExit ("T" not set)
This failure is one the *user* needs to see, as it may have to do with their
setup, but where they don't need to see a traceback and all, since they're not
developers, so I think SystemExit is appropriate here.
Signed-off-by: Chris Larson <chris_larson@mentor.com>