summaryrefslogtreecommitdiffstats
path: root/meta/classes/oelint.bbclass
diff options
context:
space:
mode:
authorChong Lu <Chong.Lu@windriver.com>2014-08-01 17:03:38 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-06 10:23:40 +0100
commit268688a489add5ac3f378cf69d39f6c8c769549a (patch)
tree8d302a90d01de873c7f54fe9b521d29386e376f1 /meta/classes/oelint.bbclass
parent207e94d4e1ffb7cae5310c16efc6224a7f0ce056 (diff)
downloadpoky-268688a489add5ac3f378cf69d39f6c8c769549a.tar.gz
oelint.bbclass: Check for ${PN} or ${P} usage
Check for ${PN} or ${P} usage in SRC_URI or S. We should use ${BPN} or ${BP} instead to avoid breaking multilib. [YOCTO #5427] (From OE-Core rev: d5a1999a7dc216b8182440cf9e8489ec79a6606e) Signed-off-by: Chong Lu <Chong.Lu@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/oelint.bbclass')
-rw-r--r--meta/classes/oelint.bbclass18
1 files changed, 18 insertions, 0 deletions
diff --git a/meta/classes/oelint.bbclass b/meta/classes/oelint.bbclass
index 07a7ed9d7c..d00f468d9a 100644
--- a/meta/classes/oelint.bbclass
+++ b/meta/classes/oelint.bbclass
@@ -64,4 +64,22 @@ python do_lint() {
64 bb.warn("%s: %s doesn't have Signed-off-by" % (pkgname, item)) 64 bb.warn("%s: %s doesn't have Signed-off-by" % (pkgname, item))
65 if findKey(path, "Upstream-Status"): 65 if findKey(path, "Upstream-Status"):
66 bb.warn("%s: %s doesn't have Upstream-Status" % (pkgname, item)) 66 bb.warn("%s: %s doesn't have Upstream-Status" % (pkgname, item))
67
68
69 ##############################
70 # Check for ${PN} or ${P} usage in SRC_URI or S
71 # Should use ${BPN} or ${BP} instead to avoid breaking multilib
72 #
73 for s in srcuri:
74 if not s.startswith("file://"):
75 if not s.find("{PN}") == -1:
76 bb.warn("%s: should use BPN instead of PN in SRC_URI" % pkgname)
77 if not s.find("{P}") == -1:
78 bb.warn("%s: should use BP instead of P in SRC_URI" % pkgname)
79
80 srcpath = d.getVar("S")
81 if not srcpath.find("{PN}") == -1:
82 bb.warn("%s: should use BPN instead of PN in S" % pkgname)
83 if not srcpath.find("{P}") == -1:
84 bb.warn("%s: should use BP instead of P in S" % pkgname)
67} 85}