From 86d30d756a60d181a95cf07041920a367a0cd0ba Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 18 Jun 2015 15:14:16 +0100 Subject: 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 --- meta/classes/oelint.bbclass | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'meta/classes/oelint.bbclass') 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() { ############################## # Test that DESCRIPTION exists # - description = d.getVar("DESCRIPTION") + description = d.getVar("DESCRIPTION", False) if description[1:10] == '{SUMMARY}': bb.warn("%s: DESCRIPTION is not set" % pkgname) @@ -14,7 +14,7 @@ python do_lint() { ############################## # Test that HOMEPAGE exists # - homepage = d.getVar("HOMEPAGE") + homepage = d.getVar("HOMEPAGE", False) if homepage == '': bb.warn("%s: HOMEPAGE is not set" % pkgname) elif not homepage.startswith("http://") and not homepage.startswith("https://"): @@ -24,7 +24,7 @@ python do_lint() { ############################## # Test for valid SECTION # - section = d.getVar("SECTION") + section = d.getVar("SECTION", False) if section == '': bb.warn("%s: SECTION is not set" % pkgname) elif not section.islower(): @@ -34,7 +34,7 @@ python do_lint() { ############################## # Check that all patches have Signed-off-by and Upstream-Status # - srcuri = d.getVar("SRC_URI").split() + srcuri = d.getVar("SRC_URI", False).split() fpaths = (d.getVar('FILESPATH', True) or '').split(':') def findPatch(patchname): @@ -80,5 +80,5 @@ python do_lint() { if not s.startswith("file://"): checkPN(pkgname, 'SRC_URI', s) - checkPN(pkgname, 'S', d.getVar('S')) + checkPN(pkgname, 'S', d.getVar('S', False)) } -- cgit v1.2.3-54-g00ecf