bitbake: parse/ConfHander/BBHandler/utils: Fix cache dependency bugs
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 29 Nov 2013 23:15:56 +0000 (23:15 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 30 Nov 2013 22:26:30 +0000 (22:26 +0000)
commite95bd16aa6bf309f255e097329845f45faf70af6
treec2bccb64f847d69b58ce80a67dbb4703eabb92db
parent33c7d501ea6349b6192e121a9c0398be1c47675e
bitbake: parse/ConfHander/BBHandler/utils: Fix cache dependency bugs

Currently bitbake only adds files to its dependency list if they exist.
If you add 'include foo.inc' to your recipe and the file doesn't exist,
then later you add the file, the cache will not be invalidated.

This leads to another bug which is that if files don't exist and then
you add them and they should be found first due to BBPATH, again the
cache won't invalidate.

This patch adds in tracking of files we check for the existence of so
that if they are added later, the cache correctly invalidates. This
necessitated a new version of bb.utils.which which returns a list of
files tested for.

The patch also adds in checks for duplicate file includes and for now
prints a warning about this. That will likely become a fatal error at
some point since its never usually desired to include a file twice.

The same issue is also fixed for class inheritance. Now when a class
is added which would be found in the usual search path, it will cause
the cache to be invalidated.

Unfortunately this is old code in bitbake and the patch isn't the
neatest since we have to work within that framework.

[YOCTO #5611]
[YOCTO #4425]

(Bitbake rev: 78d285871e4b8c54ccc4602d571e85f922e37ccd)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/parse/__init__.py
bitbake/lib/bb/parse/parse_py/BBHandler.py
bitbake/lib/bb/parse/parse_py/ConfHandler.py
bitbake/lib/bb/utils.py