insane: check if the recipe incorrectly uses DEPENDS_${PN}

Some people mistakenly use DEPENDS_${PN} and wonder why the dependencies don't
work. Check for this and tell the user to use DEPENDS.

(From OE-Core rev: cfaa104955c4ad0aafbe5d59ef85e4a8e3526c69)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2019-08-01 16:09:44 +01:00
committed by Richard Purdie
parent 06e36f13bf
commit 89a2768000

View File

@@ -1237,6 +1237,11 @@ python () {
if prog.search(pn):
package_qa_handle_error("uppercase-pn", 'PN: %s is upper case, this can result in unexpected behavior.' % pn, d)
# Some people mistakenly use DEPENDS_${PN} instead of DEPENDS and wonder
# why it doesn't work.
if (d.getVar(d.expand('DEPENDS_${PN}'))):
package_qa_handle_error("pkgvarcheck", "recipe uses DEPENDS_${PN}, should use DEPENDS", d)
issues = []
if (d.getVar('PACKAGES') or "").split():
for dep in (d.getVar('QADEPENDS') or "").split():