insane: Add build depends check
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 9 Jul 2014 20:26:56 +0000 (21:26 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 25 Jul 2014 14:33:56 +0000 (15:33 +0100)
commitc1bd0a3bef5e177609d61a988e5e625aae33db67
tree275c950b44062c1b57adf9af037928c77117e0df
parentcbef40258d78c291327e5ee9d4e8ecd542f78c13
insane: Add build depends check

Now that we can get the task dependency tree from bitbake, we can start
to use this to strengthen our QA checks. If a dependency is added on
something which isn't in our dependency tree, that is obviously a bad
thing for example.

This patch therefore checks the RDEPENDS against the list of tasks and
ensures we do have a dependency present, if not a QA warning or error
can be issued through the usual mechanism.

The implementation is complicated by needing to resolve the RDEPENDS to
a PN using pkgdata. Its possible that can be an RPROVIDES of another
package so we need to check that too if it isn't a direct RDEPENDS.

To allow this test to work, we need to extend the do_package_qa
dependencies to include all RDEPENDS. In practise the do_package_write_*
tasks already do this so there should be no new circular dependencies or
any issues like that.

For now the issues are warnings as there are issues this finds in
OE-Core which need to be resolved and certainly will be in other layers
too. This change should simplify and assist some of Martin's dependency
scripts, the idea for this came from a discussion with Martin. It has
changed in that it doesn't just cover shlibs dependencies but checks all
dependencies.

(From OE-Core rev: f6cb24cf2255297308ef57399a6be407129d9b8f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/insane.bbclass