summaryrefslogtreecommitdiff
path: root/meta/classes/oelint.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/oelint.bbclass')
-rw-r--r--meta/classes/oelint.bbclass16
1 files changed, 8 insertions, 8 deletions
diff --git a/meta/classes/oelint.bbclass b/meta/classes/oelint.bbclass
index 3e01503756..2589d34059 100644
--- a/meta/classes/oelint.bbclass
+++ b/meta/classes/oelint.bbclass
@@ -1,12 +1,12 @@
addtask lint before do_build
do_lint[nostamp] = "1"
python do_lint() {
- pkgname = d.getVar("PN", True)
+ pkgname = d.getVar("PN")
##############################
# 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,8 +34,8 @@ python do_lint() {
##############################
# Check that all patches have Signed-off-by and Upstream-Status
#
- srcuri = d.getVar("SRC_URI").split()
- fpaths = (d.getVar('FILESPATH', True) or '').split(':')
+ srcuri = d.getVar("SRC_URI", False).split()
+ fpaths = (d.getVar('FILESPATH') or '').split(':')
def findPatch(patchname):
for dir in fpaths:
@@ -45,7 +45,7 @@ python do_lint() {
def findKey(path, key):
ret = True
- f = file('%s' % path, mode = 'r')
+ f = open('%s' % path, mode = 'r')
line = f.readline()
while line:
if line.find(key) != -1:
@@ -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))
}