diff options
author | Peter Seebach <peter.seebach@windriver.com> | 2013-01-18 11:45:22 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-18 12:33:50 +0000 |
commit | b2dda721262da8abb7dc32d019e18fbc32ed8860 (patch) | |
tree | 8b4452c3ab11f6598ee041719159c2ade9738cfe /lib/bb/cooker.py | |
parent | e12c1a485f96a4701144ac81179ae1af348e5bf3 (diff) | |
download | bitbake-b2dda721262da8abb7dc32d019e18fbc32ed8860.tar.gz |
bitbake: data_smart.py and friends: Track file inclusions for bitbake -e
This code adds inclusion history to bitbake -e output, showing
which files were included, in what order. This doesn't completely
resolve timing questions, because it doesn't show you which lines
of a file were processed before or after a given include, but it
does let you figure out what the path was by which a particular
file ended up in your build at all.
How it works: data_smart acquires a .history member, which is an
IncludeHistory; this represents the inclusion of a file and all its
inclusions, recursively. It provides methods for including files,
for finishing inclusion (done as an __exit__), and for
dumping the whole tree.
The parser is modified to run includes inside a with() to push
and pop the include filename.
RP Modifications:
a) Split Include and Variable tracking
b) Replace deepcopy usage with dedicated copy function
c) Simplify some variable and usage
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/cooker.py')
-rw-r--r-- | lib/bb/cooker.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 1d38164f5..f06b71c42 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -338,6 +338,11 @@ class BBCooker: parselog.exception("Unable to read %s", fn) raise + # Display history + with closing(StringIO()) as env: + self.configuration.data.inchistory.emit(env) + logger.plain(env.getvalue()) + # emit variables and shell functions data.update_data(envdata) with closing(StringIO()) as env: |