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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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.
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.
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.
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>
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>
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>
Chris Larson [Tue, 30 Nov 2010 15:25:13 +0000 (08:25 -0700)]
cooker: no cached in progressbar and add ETA
Rather than updating the progress bar based on the recipe being processed
(whether cached or parsed), consider only parsed recipes. This reduces the
instability in progress rate introduced by the cached entries, and allows the
ETA to be resurrected and be a bit more useful.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Chris Larson [Mon, 29 Nov 2010 19:36:22 +0000 (12:36 -0700)]
Merge branch 'feature/parallel-parsing'
* feature/parallel-parsing:
cache: change to more incremental format
cooker: pass back child exceptions to the server
cache: bump cachever per master
cache: ensure 'pn' is included in the pkgvars
knotty: drop the ETA from the progressbar for now
cooker: ensure that the cache sync completes
cooker: get number of threads in constructor
cooker: don't add info for skipped recipes
cooker: show progress bar before initializing the cache
cooker: save progress chunk value (total/100)
cooker: stop loading the cache for -b
cooker: don't fire unnecessary parse progress events
cache: don't add info to cache if cache is disabled
cache: sync the cache file to disk in the background
Simplify cache syncing
Split up the ParseProgress event
Experimental usage of the 'progressbar' module
Implement parallel parsing support
cache: don't write out the cache unnecessarily
cache: create and use a RecipeInfo class
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Chris Larson [Tue, 23 Nov 2010 19:02:40 +0000 (14:02 -0500)]
knotty: drop the ETA from the progressbar for now
Currently, the progress bar is an indication of the processing of our recipes,
which includes loading the cache file, then for each recipe, either adding the
existing cached information to the CacheData or parsing the recipe from disk.
These tasks clearly take different amounts of time, so the ETA is unreliable
today. We'll resurrect this functionality after we revamp the progress
handling, fully incorporating the load of the cache file.
Signed-off-by: Chris Larson <chris_larson@mentor.com>