]> code.ossystems Code Review - openembedded-core.git/commitdiff
insane: check if the recipe incorrectly uses DEPENDS_${PN}
authorRoss Burton <ross.burton@intel.com>
Thu, 1 Aug 2019 15:09:44 +0000 (16:09 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 3 Aug 2019 13:47:31 +0000 (14:47 +0100)
Some people mistakenly use DEPENDS_${PN} and wonder why the dependencies don't
work. Check for this and tell the user to use DEPENDS.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/insane.bbclass

index 891d3a8421840b1cbbd958168c6fce44a74d6376..35c4fdb4913994fcaaf6eabc5fd632519f6bbbac 100644 (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():