diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-18 15:14:16 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-23 11:57:25 +0100 |
commit | 86d30d756a60d181a95cf07041920a367a0cd0ba (patch) | |
tree | 950353e2e1cd1e7b812ff941b4d06076acd2c752 /meta/classes/oelint.bbclass | |
parent | f98c8490099a02c42306e1671579631a61c9df73 (diff) | |
download | poky-86d30d756a60d181a95cf07041920a367a0cd0ba.tar.gz |
meta: Add explict getVar param for (non) expansion
Rather than just use d.getVar(X), use the more explict d.getVar(X, False)
since at some point in the future, having the default of expansion would
be nice. This is the first step towards that.
This patch was mostly made using the command:
sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *`
(From OE-Core rev: ab7c1d239b122c8e549e8112c88fd46c9e2b061b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/oelint.bbclass')
-rw-r--r-- | meta/classes/oelint.bbclass | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/meta/classes/oelint.bbclass b/meta/classes/oelint.bbclass index 3e01503756..1b051ca22e 100644 --- a/meta/classes/oelint.bbclass +++ b/meta/classes/oelint.bbclass | |||
@@ -6,7 +6,7 @@ python do_lint() { | |||
6 | ############################## | 6 | ############################## |
7 | # Test that DESCRIPTION exists | 7 | # Test that DESCRIPTION exists |
8 | # | 8 | # |
9 | description = d.getVar("DESCRIPTION") | 9 | description = d.getVar("DESCRIPTION", False) |
10 | if description[1:10] == '{SUMMARY}': | 10 | if description[1:10] == '{SUMMARY}': |
11 | bb.warn("%s: DESCRIPTION is not set" % pkgname) | 11 | bb.warn("%s: DESCRIPTION is not set" % pkgname) |
12 | 12 | ||
@@ -14,7 +14,7 @@ python do_lint() { | |||
14 | ############################## | 14 | ############################## |
15 | # Test that HOMEPAGE exists | 15 | # Test that HOMEPAGE exists |
16 | # | 16 | # |
17 | homepage = d.getVar("HOMEPAGE") | 17 | homepage = d.getVar("HOMEPAGE", False) |
18 | if homepage == '': | 18 | if homepage == '': |
19 | bb.warn("%s: HOMEPAGE is not set" % pkgname) | 19 | bb.warn("%s: HOMEPAGE is not set" % pkgname) |
20 | elif not homepage.startswith("http://") and not homepage.startswith("https://"): | 20 | elif not homepage.startswith("http://") and not homepage.startswith("https://"): |
@@ -24,7 +24,7 @@ python do_lint() { | |||
24 | ############################## | 24 | ############################## |
25 | # Test for valid SECTION | 25 | # Test for valid SECTION |
26 | # | 26 | # |
27 | section = d.getVar("SECTION") | 27 | section = d.getVar("SECTION", False) |
28 | if section == '': | 28 | if section == '': |
29 | bb.warn("%s: SECTION is not set" % pkgname) | 29 | bb.warn("%s: SECTION is not set" % pkgname) |
30 | elif not section.islower(): | 30 | elif not section.islower(): |
@@ -34,7 +34,7 @@ python do_lint() { | |||
34 | ############################## | 34 | ############################## |
35 | # Check that all patches have Signed-off-by and Upstream-Status | 35 | # Check that all patches have Signed-off-by and Upstream-Status |
36 | # | 36 | # |
37 | srcuri = d.getVar("SRC_URI").split() | 37 | srcuri = d.getVar("SRC_URI", False).split() |
38 | fpaths = (d.getVar('FILESPATH', True) or '').split(':') | 38 | fpaths = (d.getVar('FILESPATH', True) or '').split(':') |
39 | 39 | ||
40 | def findPatch(patchname): | 40 | def findPatch(patchname): |
@@ -80,5 +80,5 @@ python do_lint() { | |||
80 | if not s.startswith("file://"): | 80 | if not s.startswith("file://"): |
81 | checkPN(pkgname, 'SRC_URI', s) | 81 | checkPN(pkgname, 'SRC_URI', s) |
82 | 82 | ||
83 | checkPN(pkgname, 'S', d.getVar('S')) | 83 | checkPN(pkgname, 'S', d.getVar('S', False)) |
84 | } | 84 | } |