bitbake.git
9 years agobitbake.conf: use bb.utils.which
Bernhard Reutner-Fischer [Fri, 17 Dec 2010 19:55:51 +0000 (20:55 +0100)]
bitbake.conf: use bb.utils.which

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agobitbake/utils.py: Ensure the last lines of functions are printed in tracebacks
Richard Purdie [Sun, 5 Dec 2010 22:51:38 +0000 (22:51 +0000)]
bitbake/utils.py: Ensure the last lines of functions are printed in tracebacks

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agobitbake/utils.py: Improve traceback to be more helpful/clear to users
Richard Purdie [Sun, 5 Dec 2010 22:52:44 +0000 (22:52 +0000)]
bitbake/utils.py: Improve traceback to be more helpful/clear to users

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agoTimeout UI runCommand calls if server doesn't respond (or dies)
Bob Foerster [Fri, 17 Dec 2010 19:06:57 +0000 (03:06 +0800)]
Timeout UI runCommand calls if server doesn't respond (or dies)

Signed-off-by: Bob Foerster <robert@erafx.com>
9 years agoMove LAYERDIR expansion hack into DataSmart
Chris Larson [Fri, 17 Dec 2010 19:15:48 +0000 (12:15 -0700)]
Move LAYERDIR expansion hack into DataSmart

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoparse: use bb.utils.which
Chris Larson [Fri, 17 Dec 2010 18:54:09 +0000 (11:54 -0700)]
parse: use bb.utils.which

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoUpdate persist_data usage to the new API
Chris Larson [Fri, 17 Dec 2010 18:53:54 +0000 (11:53 -0700)]
Update persist_data usage to the new API

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoRevert "build: stop injecting os/bb into __builtins__"
Chris Larson [Fri, 17 Dec 2010 19:13:28 +0000 (12:13 -0700)]
Revert "build: stop injecting os/bb into __builtins__"

Temporary revert, will resurrect.

This reverts commit 566657c13de3fefb5043b71de953fb805799da95.

9 years agoFix logging level names for post-server-ui-split
Chris Larson [Fri, 17 Dec 2010 18:49:31 +0000 (11:49 -0700)]
Fix logging level names for post-server-ui-split

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobuild: fix file mode for /dev/null
Chris Larson [Fri, 17 Dec 2010 18:01:51 +0000 (11:01 -0700)]
build: fix file mode for /dev/null

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobitbake/utils.py: Improve traceback to be more helpful/clear to users
Richard Purdie [Sun, 5 Dec 2010 22:52:44 +0000 (22:52 +0000)]
bitbake/utils.py: Improve traceback to be more helpful/clear to users

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agobitbake/utils.py: Ensure the last lines of functions are printed in tracebacks
Richard Purdie [Sun, 5 Dec 2010 22:51:38 +0000 (22:51 +0000)]
bitbake/utils.py: Ensure the last lines of functions are printed in tracebacks

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agobuild: stop injecting os/bb into __builtins__
Chris Larson [Fri, 17 Dec 2010 15:28:25 +0000 (08:28 -0700)]
build: stop injecting os/bb into __builtins__

For one, we should be able to avoid this via _context in bb.utils.  For two,
__builtins__ only has to exist for CPython, so this causes problems running
bitbake under other python implementations (though we could change to doing
setattr()s against the __builtin__ module, let's avoid this instead).

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobin/bitbake: [HACK] Empty ui event queue on shutdown
Chris Larson [Fri, 17 Dec 2010 16:12:46 +0000 (10:12 -0600)]
bin/bitbake: [HACK] Empty ui event queue on shutdown

This is a workaround to ensure the user always sees any queued up log
messages, even if the UI has shut down without showing them.  This is far from
ideal.  The correct fix is to alter the UIs to shut down more cleanly,
ensuring they display any remaining queued up events to the user before they
exit.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoEnsure LogHandler is set up for the server construction
Chris Larson [Fri, 17 Dec 2010 16:13:18 +0000 (10:13 -0600)]
Ensure LogHandler is set up for the server construction

If we add the LogHandler object in the server.main, rather than earlier, any
log messages emitted during the construction of the server (and, therefore,
during the construction of the cooker) will not be seen.  This includes the
error(s) which the cooker can emit when parsing the command line.  With this,
we again see the error if you try to use -g without specifying a recipe to
operate against.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agocooker: ensure parseCommandLine can get BBPKGS
Chris Larson [Fri, 17 Dec 2010 16:22:43 +0000 (10:22 -0600)]
cooker: ensure parseCommandLine can get BBPKGS

Without this, one can't use BBPKGS with bitbake -g, for example.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoResurrect alternative UIs
Bob Foerster [Fri, 17 Dec 2010 15:20:39 +0000 (23:20 +0800)]
Resurrect alternative UIs

The various alternative UIs have been updated to once again be functional
with the latest bitbake internals.  Each of the UIs still have much room for
functional improvement.

In particular, they have been updated to:
 - interact with the new process based server
 - handle the current set of events and notifications fired from the server
   and its associated subsystems

Signed-off-by: Bob Foerster <robert@erafx.com>
9 years agoutils: don't overwrite builtin dir() function
Bernhard Reutner-Fischer [Fri, 17 Dec 2010 11:29:49 +0000 (12:29 +0100)]
utils: don't overwrite builtin dir() function

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agobzr: use utils.remove instead of os.system
Bernhard Reutner-Fischer [Fri, 17 Dec 2010 11:26:35 +0000 (12:26 +0100)]
bzr: use utils.remove instead of os.system

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agobuild: use utils.remove instead of os.system
Bernhard Reutner-Fischer [Fri, 17 Dec 2010 11:25:53 +0000 (12:25 +0100)]
build: use utils.remove instead of os.system

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
9 years agoutils: drop unnecessary debug msgs from mkdirhier
Chris Larson [Thu, 16 Dec 2010 19:18:31 +0000 (12:18 -0700)]
utils: drop unnecessary debug msgs from mkdirhier

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoForcibly shut down the server if the UI is terminated
Chris Larson [Thu, 16 Dec 2010 15:38:57 +0000 (08:38 -0700)]
Forcibly shut down the server if the UI is terminated

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoserver: ensure the cooker is stopped when shutting down
Chris Larson [Thu, 16 Dec 2010 15:50:31 +0000 (08:50 -0700)]
server: ensure the cooker is stopped when shutting down

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoserver: kill stdin/stdout/stderr
Chris Larson [Fri, 10 Dec 2010 17:37:11 +0000 (10:37 -0700)]
server: kill stdin/stdout/stderr

This ensures that nothing run from the server can touch the console, in
particular event handlers and python tasks, both of which can use bb.msg or
the bitbake loggers to send output to the UI in a correct fashion instead.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoserver: fix interrupt handling for process
Bob Foerster [Fri, 26 Nov 2010 21:15:36 +0000 (16:15 -0500)]
server: fix interrupt handling for process

SIGINT is now blocked within the server context, thus allowing the UI to fully
handle all user interaction.  There is no longer a need to check for
KeyboardInterrupt Exceptions anywhere within the server context.

Signed-off-by: Bob Foerster <robert@erafx.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoShow the user progress when loading the cache
Bob Foerster [Mon, 22 Nov 2010 15:13:56 +0000 (10:13 -0500)]
Show the user progress when loading the cache

Signed-off-by: Bob Foerster <robert@erafx.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoRun the server and UI in separate processes
Bob Foerster [Wed, 24 Nov 2010 17:53:12 +0000 (12:53 -0500)]
Run the server and UI in separate processes

This uses the python multiprocessing module, both to spawn the server process
and for communication between the processes.

Signed-off-by: Bob Foerster <robert@erafx.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agocooker: fix remnant rq/rqdata issue from poky sync
Chris Larson [Thu, 16 Dec 2010 17:39:21 +0000 (10:39 -0700)]
cooker: fix remnant rq/rqdata issue from poky sync

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoRevert "build: kill stdout in python functions"
Chris Larson [Thu, 16 Dec 2010 14:51:53 +0000 (07:51 -0700)]
Revert "build: kill stdout in python functions"

We have a better solution for this on the separate-ui-and-server branch, so
this version is no longer necessary.

This reverts commit 20929afdd87e5124891f121c3640aa9efa368c2c.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agorunqueue: fix remnant rq/rqdata reference from poky sync
Chris Larson [Thu, 16 Dec 2010 14:51:05 +0000 (07:51 -0700)]
runqueue: fix remnant rq/rqdata reference from poky sync

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoknotty: exit with 1 if we see a critical log message
Chris Larson [Wed, 15 Dec 2010 20:50:28 +0000 (13:50 -0700)]
knotty: exit with 1 if we see a critical log message

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agocooker: don't swallow recipe parse errors
Chris Larson [Thu, 16 Dec 2010 05:07:38 +0000 (22:07 -0700)]
cooker: don't swallow recipe parse errors

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agorunqueue: resurrect the fix in 90c2b6c
Chris Larson [Thu, 16 Dec 2010 01:30:07 +0000 (18:30 -0700)]
runqueue: resurrect the fix in 90c2b6c

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobuild: fix log file display
Chris Larson [Thu, 16 Dec 2010 01:28:52 +0000 (18:28 -0700)]
build: fix log file display

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agomanual: document scmdata=keep for CVS, SVN and Git
Andreas Oberritter [Thu, 9 Dec 2010 21:22:11 +0000 (21:22 +0000)]
manual: document scmdata=keep for CVS, SVN and Git

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agofetchers: Add parameter scmdata=keep to include .git/ and others in generated tarballs.
Andreas Oberritter [Wed, 8 Dec 2010 13:38:23 +0000 (13:38 +0000)]
fetchers: Add parameter scmdata=keep to include .git/ and others in generated tarballs.

* Allows generating version information from SCMs during build.
* Note that tar doesn't need to use --exclude '.git', because
  git checkout-index doesn't clone the repository.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobuild: fix FuncFailed for the no logfile case
Chris Larson [Wed, 15 Dec 2010 22:35:13 +0000 (15:35 -0700)]
build: fix FuncFailed for the no logfile case

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoprocess: handle OSErrors other than file not found
Chris Larson [Wed, 15 Dec 2010 22:13:07 +0000 (15:13 -0700)]
process: handle OSErrors other than file not found

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobuild: write logfiles per task, not per function
Chris Larson [Wed, 15 Dec 2010 21:55:04 +0000 (14:55 -0700)]
build: write logfiles per task, not per function

Based on d14f9bf6 from poky, reworked for master and other cleanup.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agodata_smart: add optional expansion to getVarFlag()
Paul Eggleton [Fri, 10 Dec 2010 15:30:30 +0000 (15:30 +0000)]
data_smart: add optional expansion to getVarFlag()

Add a parameter to getVarFlag() to auto-expand the value of the flag. This
makes getVarFlag() more consistent with getVar(), and allows expansion of
vardeps and vardepsexclude (which has been done in this commit).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
9 years agobuild: fix copy/paste thinko regarding LC_ALL
Chris Larson [Wed, 15 Dec 2010 15:41:52 +0000 (08:41 -0700)]
build: fix copy/paste thinko regarding LC_ALL

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agorunqueue: fix check_stamp_task call in chck_stamp_fn
Chris Larson [Wed, 15 Dec 2010 02:08:06 +0000 (21:08 -0500)]
runqueue: fix check_stamp_task call in chck_stamp_fn

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agorunqueue: fix a get_task_id call
Chris Larson [Wed, 15 Dec 2010 01:42:23 +0000 (20:42 -0500)]
runqueue: fix a get_task_id call

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobuild: ensure LogTee has a valid name property
Chris Larson [Tue, 14 Dec 2010 16:25:58 +0000 (09:25 -0700)]
build: ensure LogTee has a valid name property

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobuild: fix -D with shell functions
Chris Larson [Tue, 14 Dec 2010 16:20:33 +0000 (09:20 -0700)]
build: fix -D with shell functions

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoFix PWD issue with new exec_func_shell
Chris Larson [Tue, 14 Dec 2010 15:10:36 +0000 (08:10 -0700)]
Fix PWD issue with new exec_func_shell

The previous attempt was incorrect.  The issue isn't that subprocess fails to
set PWD, it's that PWD is in the metadata, inherited from the environment, and
is re-exported, overwriting the actual accurate one in the shell environment
with the old one from the metadata.  So, ensure that PWD in the metadata is
not exported.

We can ditch this when the environment handling is reworked (e.g. poky's
commit to do so).

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoEnsure that the invalid UI error goes to stderr
Chris Larson [Mon, 13 Dec 2010 23:24:14 +0000 (16:24 -0700)]
Ensure that the invalid UI error goes to stderr

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobuild: set PWD in the subprocess preexec hook
Chris Larson [Mon, 13 Dec 2010 22:58:15 +0000 (15:58 -0700)]
build: set PWD in the subprocess preexec hook

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoMove the runq task start/failed messages to the UI
Chris Larson [Mon, 6 Dec 2010 21:58:55 +0000 (14:58 -0700)]
Move the runq task start/failed messages to the UI

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobitbake/runqueue.py: Factor task skipping code into a function
Richard Purdie [Wed, 18 Aug 2010 16:21:40 +0000 (17:21 +0100)]
bitbake/runqueue.py: Factor task skipping code into a function

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agobitbake/runqueue.py: Create RunQueueExecute and RunQueueExecuteTasks classes, further...
Richard Purdie [Wed, 18 Aug 2010 16:13:06 +0000 (17:13 +0100)]
bitbake/runqueue.py: Create RunQueueExecute and RunQueueExecuteTasks classes, further splitting up runqueue

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agobitbake: Split Runqueue into two classes, a data processor and the execution part
Richard Purdie [Wed, 18 Aug 2010 10:30:53 +0000 (11:30 +0100)]
bitbake: Split Runqueue into two classes, a data processor and the execution part

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agoSilence python 2.7 nested context manager warning
Chris Larson [Mon, 13 Dec 2010 17:03:55 +0000 (10:03 -0700)]
Silence python 2.7 nested context manager warning

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoRename command events, adjust compareRevisions
Chris Larson [Fri, 10 Dec 2010 23:53:19 +0000 (16:53 -0700)]
Rename command events, adjust compareRevisions

- Moved the logic for comparing revisions from cooker into command
- Removed 'Cooker' from the event names
- Renamed the 'ExitCode' event into CommandExit, and changed CommandFailed to
  be a subclass of CommandExit

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoRework the persist_data API
Chris Larson [Wed, 22 Sep 2010 01:11:54 +0000 (18:11 -0700)]
Rework the persist_data API

Rather than having to run .addDomain() and then .getValue(domain, key),
.setValue(domain, key), etc, now it just works as mappings.

As an example:

    setValue(domain, key) -> persist[domain][key] = value

It also arranges things so we can construct objects of this type using any
arbitrary filename/path for the sqlite3 database, rather than being so
tightly bound to the metadata.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobuild: don't create ${B} when the 'dirs' flag is unset
Chris Larson [Fri, 10 Dec 2010 23:10:33 +0000 (18:10 -0500)]
build: don't create ${B} when the 'dirs' flag is unset

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoevent: use cPickle for events
Chris Larson [Fri, 10 Dec 2010 21:38:48 +0000 (14:38 -0700)]
event: use cPickle for events

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoutils: fix 'lock' variable reference
Chris Larson [Fri, 10 Dec 2010 21:27:28 +0000 (14:27 -0700)]
utils: fix 'lock' variable reference

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobb.event: fix MsgBase ref in fire_class_handlers
Chris Larson [Fri, 10 Dec 2010 16:04:08 +0000 (11:04 -0500)]
bb.event: fix MsgBase ref in fire_class_handlers

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoKill the uncaught exception handler
Chris Larson [Fri, 10 Dec 2010 15:51:47 +0000 (10:51 -0500)]
Kill the uncaught exception handler

We now wrap the main() in a try/except, ensuring that both the main portion of
bin/bitbake and the UI raising an exception will be shown to the user.  For
the server and workers, we can ensure in the server itself that exceptions are
handled correctly.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobuild: kill stdout in python functions
Chris Larson [Fri, 10 Dec 2010 03:47:00 +0000 (22:47 -0500)]
build: kill stdout in python functions

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobuild: send logging messages to the log file for python functions
Chris Larson [Fri, 10 Dec 2010 04:38:35 +0000 (23:38 -0500)]
build: send logging messages to the log file for python functions

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoRevert "bitbake/git.py: Make sure different branches can have different revisions...
Chris Larson [Fri, 10 Dec 2010 14:54:53 +0000 (09:54 -0500)]
Revert "bitbake/git.py: Make sure different branches can have different revisions without triggering build count increases"

Per Martin Jansa, this breaks compatibility.  We can revisit in the future,
likely during the fetcher rewrite.

This reverts commit f3292fa11723c748ef1b4270384abf6d586a822e.

9 years agobuild: fix remnant access of logfile in exec_func_python
Chris Larson [Fri, 10 Dec 2010 03:34:47 +0000 (22:34 -0500)]
build: fix remnant access of logfile in exec_func_python

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoutils: fix calls to close() in the lock/unlock functions
Chris Larson [Fri, 10 Dec 2010 02:50:23 +0000 (21:50 -0500)]
utils: fix calls to close() in the lock/unlock functions

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobuild: use a contextmanager for locks
Chris Larson [Fri, 10 Dec 2010 01:29:31 +0000 (20:29 -0500)]
build: use a contextmanager for locks

Also don't bother passing logfile to exec_func_python, at least until we start
adding the logfile as a file handler to the bitbake logger.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobuild: use bb.process instead of os.system
Chris Larson [Fri, 10 Dec 2010 01:14:48 +0000 (20:14 -0500)]
build: use bb.process instead of os.system

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoprocess: add subprocess-based bits
Chris Larson [Fri, 10 Dec 2010 01:14:40 +0000 (20:14 -0500)]
process: add subprocess-based bits

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agoRename the ui 'init' method to 'main'
Chris Larson [Thu, 9 Dec 2010 19:05:22 +0000 (14:05 -0500)]
Rename the ui 'init' method to 'main'

As these may run the UI in a blocking fashion and then return the exit code,
'init' was an inappropriate name, and 'main' is more appropriate.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agocooker: use re match, not search in re_match_strings
Chris Larson [Tue, 23 Nov 2010 22:30:45 +0000 (15:30 -0700)]
cooker: use re match, not search in re_match_strings

We want to match the requested pattern at the beginning of the string,
otherwise things behave in an unintuitive manner wrt ASSUME_PROVIDED (e.g.
ASSUME_PROVIDED += "gtk+" will also assume foo-gtk+ is provided), and the user
can always use '.*gtk+' to get the old behavior.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agotaskdata: use 'any' in re_match_strings
Chris Larson [Tue, 23 Nov 2010 22:30:23 +0000 (15:30 -0700)]
taskdata: use 'any' in re_match_strings

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agobitbake/data_smart: Refactor _append/_prepend code to remove duplication
Richard Purdie [Tue, 7 Dec 2010 12:25:24 +0000 (12:25 +0000)]
bitbake/data_smart: Refactor _append/_prepend code to remove duplication

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agobitbake/data_smart: Fix append/prepend/override ordering issue
Richard Purdie [Mon, 6 Dec 2010 00:39:20 +0000 (00:39 +0000)]
bitbake/data_smart: Fix append/prepend/override ordering issue

Where a variable name consisted of an append/prepend combined with an override
and there was also an append/prepend to the variable, the override could be lost
if the override was not in OVERRIDES.

For example:

FOO = "A"
FOO_append = "B"
FOO_append_virtclass-native = "C"

could result in "AB" even though virtclass-native was in OVERRIDES.

With this patch applied, the result is "ABC" as would be expected.

The problem was the deletion of the _append/_prepend flag was happening
if *any* append/prepend was procesed, the result should really be that
it should contain any unprocessed append/prepend.

Kevin Tian deserves credit for looking into this and working out the
problem here.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
9 years agobitbake/goggle: interaction tweaks
Joshua Lock [Thu, 11 Nov 2010 10:26:48 +0000 (10:26 +0000)]
bitbake/goggle: interaction tweaks

Set the goggle window to a more sane default size (640x480) and hook up the
close button.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
9 years agobitbake/depexp: Factor ProgressBar into a separate class in crumbs/
Joshua Lock [Thu, 25 Nov 2010 15:15:10 +0000 (15:15 +0000)]
bitbake/depexp: Factor ProgressBar into a separate class in crumbs/

ProgressBar will be useful in other UI elements so make it it's own class.
Make ProgressBar a subclass of gtk.Dialog, rather than gtk.Window, so that we
can suggest the window manager parent the ProgressBar to the widget passed at
as parent.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
9 years agobitbake/crumbs: add optional pbar parameter to RunningBuild.handle_event()
Joshua Lock [Thu, 25 Nov 2010 15:54:19 +0000 (15:54 +0000)]
bitbake/crumbs: add optional pbar parameter to RunningBuild.handle_event()

Defaults to None, but if set will pass the ParseProgress sofar and total to
pbar's update() method.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
9 years agobitbake/goggle: add a ProgressBar for parse progress
Joshua Lock [Thu, 25 Nov 2010 15:56:07 +0000 (15:56 +0000)]
bitbake/goggle: add a ProgressBar for parse progress

Construct a ProgressBar and pass it to the RunningBuild.handle_event() so
that goggle users are notified of metadata parsing progress.

UI's with status make users less nervous

Signed-off-by: Joshua Lock <josh@linux.intel.com>
9 years agobitbake/xmlrpc: Modify xmlrpc server to work with Python 2.7
Joshua Lock [Wed, 1 Dec 2010 14:40:21 +0000 (14:40 +0000)]
bitbake/xmlrpc: Modify xmlrpc server to work with Python 2.7

Python 2.7's library changes some of xmlrpclib's internal implementation such
that interacting with a proxy to BitBakes SimpleXMLRPCServer would cause
BitBake to crash.

The issue was traced to changes in the xmlrpclib.Transport implementation and
Python bug #8194 (http://bugs.python.org/issue8194).

This patch introduces a workaround by create a subclass of
xmlrpclib.Transport, which overrides the offending methods with the Python
2.6.6 implementation copy and pasted from the Python 2.6.6 xmlrpclib, and
using this BBTransport implementation for both xmlrpclib.Server objects we
create.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
9 years agobitbake/goggle: automatically show most recently added message
Joshua Lock [Mon, 6 Dec 2010 15:34:50 +0000 (15:34 +0000)]
bitbake/goggle: automatically show most recently added message

It seems likely that the user would want to view the most recently emitted
messages so this patch sets the message dislay treeview to scroll to any
newly added rows.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
9 years agobitbake/crumbs: fix the event name determination
Joshua Lock [Thu, 11 Nov 2010 10:18:11 +0000 (10:18 +0000)]
bitbake/crumbs: fix the event name determination

Due to some recent change *somewhere* we need to explicitly look at the
name attribute on the instances class, rather than the name attribute of
the instance.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
9 years agobitbake/crumbs: do the test for ignored messages sooner
Joshua Lock [Thu, 11 Nov 2010 10:14:11 +0000 (10:14 +0000)]
bitbake/crumbs: do the test for ignored messages sooner

Move the test for ignored messages to the start of the message handling loop to
avoid doing work for messages which are only going to be ignored.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
9 years agobitbake/crumbs: Fix crumbs UI for bitbake event class name changes
Joshua Lock [Thu, 11 Nov 2010 10:13:08 +0000 (10:13 +0000)]
bitbake/crumbs: Fix crumbs UI for bitbake event class name changes

Some of the events we where trying to look for have had their class names
changed, fix these references.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
9 years agobitbake/cooker: fix idle command processing in servers
Joshua Lock [Wed, 1 Dec 2010 16:59:04 +0000 (16:59 +0000)]
bitbake/cooker: fix idle command processing in servers

idle command processing in each of the servers does not handle an explicit
None return value, which means the goggle UI ends up repeatedly adding
"Tasks Summary:" rows to the list.

This patch modifies BBCooker.buildTargets.buildTargetsIdle to return False
when BuildCompleted is fired, as is done in BBCooker.buildFile.buildFileIdle.
It may be that the correct way to fix this is to change the idle command
processing in the servers.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agocooker: add shutdown/stop methods
Chris Larson [Wed, 8 Dec 2010 20:08:18 +0000 (15:08 -0500)]
cooker: add shutdown/stop methods

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agocooker: merge cookerState and cookerAction
Chris Larson [Wed, 8 Dec 2010 19:30:33 +0000 (14:30 -0500)]
cooker: merge cookerState and cookerAction

Signed-off-by: Chris Larson <chris_larson@mentor.com>
9 years agocooker: use a pool, abort on first parse error
Chris Larson [Tue, 7 Dec 2010 18:00:22 +0000 (13:00 -0500)]
cooker: use a pool, abort on first parse error

Signed-off-by: Chris Larson <chris_larson@mentor.com>
10 years agoknotty: use enumerate for task waiting
Chris Larson [Tue, 7 Dec 2010 04:58:07 +0000 (21:58 -0700)]
knotty: use enumerate for task waiting

Signed-off-by: Chris Larson <chris_larson@mentor.com>
10 years agoknotty: shift non-interactive progress into a class
Chris Larson [Tue, 7 Dec 2010 04:06:13 +0000 (21:06 -0700)]
knotty: shift non-interactive progress into a class

Signed-off-by: Chris Larson <chris_larson@mentor.com>
10 years agoMerged the following poky fetcher fixes:
Chris Larson [Mon, 6 Dec 2010 15:19:37 +0000 (08:19 -0700)]
Merged the following poky fetcher fixes:

- bitbake/fetch: Allow checking of a single url at a time (massive sstate
  speed improvement)
- bitbake/fetch: Fix handling of mirrors when checking for url validity
- bitbake/fetch: When fetchers return errors, ensure any partial download is
  cleared
- bitbake/fetch: Make URL checking slightly less verbose (distracting with the
  sstate code)
- bitbake/fetch/git: Ensure fullclone repositories are fully fetched
- bitbake/fetcher: Deal with a ton of different bugs
- bitbake/fetch/git.py: Fix git fetcher to correctly use mirror tarballs
- bitbake/fetch/__init__.py: Abstract mirror variable handling and enhance to
  accept \n delimitation in variables
- bitbake/fetch: fix logic to prevent fetches when the file already exists
- bitbake/fetch: ensure the go() method completes when not using premirrors
- Export ALL_PROXY for bitbake commands
- bitbake: Add proxy variables to standard export list
- bitbake/fetch/git: fix try_premirror() definition .Method takes 4
  parameters.
- bitbake/fetch: fix by moving try_premirror() to the right place
- bitbake/fetch: add try_premirror method and special case git fetcher
- fetch: fix setting of localpath in SRC_URI parameters
- bitbake/fetch: ensure the mirrored repository is updated as required
- bitbake/git: define a forcefetch method
- bitbake/fetch: Respect forcefetch even when pulling from a mirror
- bitbake/git.py: Make sure different branches can have different revisions
  without triggering build count increases
- bitbake/git.py: Allow tracking of branches in SRC_URI without cloning for
  use with fullclone
- bitbake/git.py: Make sure a full clone checkout always updates

Signed-off-by: Chris Larson <chris_larson@mentor.com>
10 years agoutils.py: Fix bb.copyfile to change the permissions of the file back correctly
Richard Purdie [Mon, 23 Aug 2010 12:01:05 +0000 (13:01 +0100)]
utils.py: Fix bb.copyfile to change the permissions of the file back correctly

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
10 years agobitbake/utils.py: Improve better_exec debug output
Richard Purdie [Fri, 20 Aug 2010 11:52:33 +0000 (12:52 +0100)]
bitbake/utils.py: Improve better_exec debug output

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
10 years agobitbake/utils.py: Give useful debug information when no lineno information is available
Richard Purdie [Thu, 19 Aug 2010 22:26:46 +0000 (23:26 +0100)]
bitbake/utils.py: Give useful debug information when no lineno information is available

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
10 years agobitbake/utils.py: Allow explode_dep_versions to handle the commas join_deps can intro...
Richard Purdie [Tue, 17 Aug 2010 08:28:33 +0000 (09:28 +0100)]
bitbake/utils.py: Allow explode_dep_versions to handle the commas join_deps can introduce into strings

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
10 years agobuild.py: Add a symlink for the logging
Mark Hatle [Thu, 30 Sep 2010 20:04:18 +0000 (15:04 -0500)]
build.py: Add a symlink for the logging

[BUGID #375]

When configuring for the log file output, we generate a symlink to the
target filename.  This link uses the same file naming, but without the
active pid, making it easier to see which log file is the last one
generated.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
10 years agobitbake/build.py: Set BB_FILENAME to represent the .bb file being built (including...
Richard Purdie [Mon, 13 Sep 2010 14:39:07 +0000 (15:39 +0100)]
bitbake/build.py: Set BB_FILENAME to represent the .bb file being built (including any virtual prefix)

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
10 years agobitbake/build.py: Note when calling functions that don't exist. Should probably error
Richard Purdie [Thu, 5 Aug 2010 11:40:00 +0000 (12:40 +0100)]
bitbake/build.py: Note when calling functions that don't exist. Should probably error

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
10 years agobitbake/build.py: Set the current taskname in the BB_CURRENTTASK variable
Richard Purdie [Thu, 5 Aug 2010 09:09:13 +0000 (10:09 +0100)]
bitbake/build.py: Set the current taskname in the BB_CURRENTTASK variable

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
10 years agobitbake/server: Raise a shutdown event if we're seeing exceptions
Richard Purdie [Fri, 20 Aug 2010 08:38:24 +0000 (09:38 +0100)]
bitbake/server: Raise a shutdown event if we're seeing exceptions

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
10 years agobitbake/cooker.py: Allow idle handlers to pass through a true value
Richard Purdie [Wed, 18 Aug 2010 16:37:15 +0000 (17:37 +0100)]
bitbake/cooker.py: Allow idle handlers to pass through a true value

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
10 years agobitbake/runqueue.py: Drop duplicated class
Richard Purdie [Wed, 18 Aug 2010 16:17:50 +0000 (17:17 +0100)]
bitbake/runqueue.py: Drop duplicated class

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>