diff mbox series

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

Message ID 20190801150944.26219-1-ross.burton@intel.com
State Accepted
Commit cfaa104955c4ad0aafbe5d59ef85e4a8e3526c69
Headers show
Series insane: check if the recipe incorrectly uses DEPENDS_${PN} | expand

Commit Message

Ross Burton Aug. 1, 2019, 3:09 p.m. UTC
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>

---
 meta/classes/insane.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

-- 
2.20.1

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 891d3a84218..35c4fdb4913 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -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():