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:35:19 +0000 |
commit | 4dd6d9139cb77f2b0ff7ab9482e853108efad5aa (patch) | |
tree | f7fa2af68009e261946b767f2b3d6fc5f0258c5e /bitbake/lib/bb/parse | |
parent | 9753283a3fe417ba827e4cee153184b6a25699de (diff) | |
download | poky-4dd6d9139cb77f2b0ff7ab9482e853108efad5aa.tar.gz |
bitbake: 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
(Bitbake rev: b2dda721262da8abb7dc32d019e18fbc32ed8860)
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/parse')
-rw-r--r-- | bitbake/lib/bb/parse/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bitbake/lib/bb/parse/__init__.py b/bitbake/lib/bb/parse/__init__.py index 4293d09c7a..3f93ad2e6a 100644 --- a/bitbake/lib/bb/parse/__init__.py +++ b/bitbake/lib/bb/parse/__init__.py | |||
@@ -87,7 +87,8 @@ def handle(fn, data, include = 0): | |||
87 | """Call the handler that is appropriate for this file""" | 87 | """Call the handler that is appropriate for this file""" |
88 | for h in handlers: | 88 | for h in handlers: |
89 | if h['supports'](fn, data): | 89 | if h['supports'](fn, data): |
90 | return h['handle'](fn, data, include) | 90 | with data.inchistory.include(fn): |
91 | return h['handle'](fn, data, include) | ||
91 | raise ParseError("not a BitBake file", fn) | 92 | raise ParseError("not a BitBake file", fn) |
92 | 93 | ||
93 | def init(fn, data): | 94 | def init(fn, data): |