summaryrefslogtreecommitdiff
path: root/meta
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:22:42 +0100
commitd5a1999a7dc216b8182440cf9e8489ec79a6606e (patch)
tree3767c9f360501bc4f3af270d92ac7a566cae1e9a /meta
parenta2b6be10daca733ba4e557bd2d831c60589e9ffd (diff)
downloadopenembedded-core-d5a1999a7dc216b8182440cf9e8489ec79a6606e.tar.gz
openembedded-core-d5a1999a7dc216b8182440cf9e8489ec79a6606e.tar.bz2
openembedded-core-d5a1999a7dc216b8182440cf9e8489ec79a6606e.zip
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] 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')
-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() {
bb.warn("%s: %s doesn't have Signed-off-by" % (pkgname, item))
if findKey(path, "Upstream-Status"):
bb.warn("%s: %s doesn't have Upstream-Status" % (pkgname, item))
+
+
+ ##############################
+ # Check for ${PN} or ${P} usage in SRC_URI or S
+ # Should use ${BPN} or ${BP} instead to avoid breaking multilib
+ #
+ for s in srcuri:
+ if not s.startswith("file://"):
+ if not s.find("{PN}") == -1:
+ bb.warn("%s: should use BPN instead of PN in SRC_URI" % pkgname)
+ if not s.find("{P}") == -1:
+ bb.warn("%s: should use BP instead of P in SRC_URI" % pkgname)
+
+ srcpath = d.getVar("S")
+ if not srcpath.find("{PN}") == -1:
+ bb.warn("%s: should use BPN instead of PN in S" % pkgname)
+ if not srcpath.find("{P}") == -1:
+ bb.warn("%s: should use BP instead of P in S" % pkgname)
}