Richard Purdie [Tue, 3 Aug 2010 13:30:20 +0000 (14:30 +0100)]
data: Add emit_func and generate_dependencies
These functions allow generation of dependency data between functions and
variables allowing moves to be made towards generating checksums and allowing
use of the dependency information in other parts of bitbake.
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Richard Purdie [Mon, 2 Aug 2010 09:20:20 +0000 (10:20 +0100)]
codeparser: add module for parsing shell/python
This commit is derived from Chris Larson's checksum work, turned into a
standalone piece of code for parsing python and shell functions.
The deindent code has been replaced with code to work around indentation
for speed. The original NodeVisitor in the ast was replaced with a faster
class walk call.
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
- control variable BB_STRICT_CHECKSUM
when SRC_URI checksum is missing, this variable decide pass or not
if BB_STRICT_CHECKSUM = "1", missing checksum is fatal
Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com> Signed-off-by: Chris Larson <chris_larson@mentor.com>
Chris Larson [Tue, 28 Dec 2010 17:02:49 +0000 (10:02 -0700)]
bb.debug: handle caller not passing a debug level
This is a compatibility measure, as previous versions did not error out when
this occurred, and will most likely be dropped in the next bitbake minor
version in favor of a fatal error.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Chris Larson [Wed, 29 Dec 2010 23:23:14 +0000 (16:23 -0700)]
fetch: resurrect branch inclusion in git revision key
This is similar to Richard Purdie's commit, but falls back to checking the
persist_data database for the old key if the new does not exist, so as to
retain compatibility for at least one bitbake minor version.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Chris Larson [Tue, 28 Dec 2010 17:29:04 +0000 (10:29 -0700)]
build: work around do_clean issue by creating T in exec_func
In some repositories (e.g. poky), do_clean removes WORKDIR, then uses
exec_func, which expects T to exist, so let's make sure it does. I think its
fair to assume that the runfile dir exists in exec_func, so this is a
temporary measure.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Chris Larson [Fri, 24 Dec 2010 02:22:21 +0000 (19:22 -0700)]
data_smart: don't include functions in name lookups
For raw name lookups in python snippets, don't return the values for functions
in the metadata. This was necessary to fix issues once the methodpool
functions get added to the metadata.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Chris Larson [Sat, 18 Dec 2010 17:57:12 +0000 (10:57 -0700)]
shell: remove
bb.shell is unused and incompatible with current bitbake. We can resurrect it
in a more functional form when we add the text input to the goggle and ncurses
UIs.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Chris Larson [Sat, 18 Dec 2010 17:49:15 +0000 (10:49 -0700)]
Revert "server: kill stdin/stdout/stderr"
This is a useful thing, but requires that tasks behave correctly, sending
their output via the usual bitbake messaging mechanisms, rather than via
stdout. We'll postpone this until after the release.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
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>
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>
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>